@rackbops/ui-react 0.2.37 → 0.2.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/feedback.d.ts +6 -0
- package/dist/feedback.js +2 -2
- package/package.json +1 -1
package/dist/feedback.d.ts
CHANGED
|
@@ -2,6 +2,12 @@ import { type HTMLAttributes, type ProgressHTMLAttributes, type ReactNode, type
|
|
|
2
2
|
export type SemanticVariant = "info" | "success" | "warning" | "danger";
|
|
3
3
|
export interface BadgeProps extends HTMLAttributes<HTMLSpanElement>, RefAttributes<HTMLSpanElement> {
|
|
4
4
|
variant?: SemanticVariant;
|
|
5
|
+
/**
|
|
6
|
+
* Size. "md" maps to .rb-badge--md for a row-text-sized pill (inside a
|
|
7
|
+
* .rb-table row, next to 13px cell text); "sm" is the default and the
|
|
8
|
+
* compact chip every existing consumer already renders.
|
|
9
|
+
*/
|
|
10
|
+
size?: "sm" | "md";
|
|
5
11
|
}
|
|
6
12
|
export declare const Badge: import("react").ForwardRefExoticComponent<Omit<BadgeProps, "ref"> & RefAttributes<HTMLSpanElement>>;
|
|
7
13
|
export interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, "title">, RefAttributes<HTMLDivElement> {
|
package/dist/feedback.js
CHANGED
|
@@ -7,8 +7,8 @@ function styled(tag, cls, attrs = {}) {
|
|
|
7
7
|
return createElement(tag, { ref, ...attrs, className: cx(cls, className), ...rest });
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
|
-
export const Badge = forwardRef(function Badge({ variant, className, ...rest }, ref) {
|
|
11
|
-
return (_jsx("span", { ref: ref, className: cx("rb-badge", variant && `rb-badge--${variant}`, className), ...rest }));
|
|
10
|
+
export const Badge = forwardRef(function Badge({ variant, size = "sm", className, ...rest }, ref) {
|
|
11
|
+
return (_jsx("span", { ref: ref, className: cx("rb-badge", variant && `rb-badge--${variant}`, size === "md" && "rb-badge--md", className), ...rest }));
|
|
12
12
|
});
|
|
13
13
|
Badge.displayName = "Badge";
|
|
14
14
|
/** A status banner (.rb-alert); `role="alert"` announces it to screen readers on mount/update. */
|