@homebound/beam 2.187.1 → 2.188.0
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.
|
@@ -6,6 +6,7 @@ export interface ChipProps<X> {
|
|
|
6
6
|
title?: string;
|
|
7
7
|
xss?: X;
|
|
8
8
|
type?: ChipType;
|
|
9
|
+
compact?: boolean;
|
|
9
10
|
}
|
|
10
11
|
/** Kinda like a chip, but read-only, so no `onClick` or `hover`. */
|
|
11
12
|
export declare function Chip<X extends Only<Xss<Margin>, X>>({ type, ...props }: ChipProps<X>): import("@emotion/react/jsx-runtime").JSX.Element;
|
package/dist/components/Chip.js
CHANGED
|
@@ -16,9 +16,8 @@ exports.ChipTypes = {
|
|
|
16
16
|
};
|
|
17
17
|
/** Kinda like a chip, but read-only, so no `onClick` or `hover`. */
|
|
18
18
|
function Chip({ type = exports.ChipTypes.neutral, ...props }) {
|
|
19
|
-
const { text, title = text, xss = {} } = props;
|
|
20
19
|
const { fieldProps } = (0, PresentationContext_1.usePresentationContext)();
|
|
21
|
-
const compact = fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.compact;
|
|
20
|
+
const { text, title = text, xss = {}, compact = fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.compact } = props;
|
|
22
21
|
const tid = (0, useTestIds_1.useTestIds)(props, "chip");
|
|
23
22
|
return ((0, jsx_runtime_1.jsx)("span", Object.assign({ css: {
|
|
24
23
|
...Css_1.Css[compact ? "xs" : "sm"].dif.aic.br16.pl1.px1.pyPx(2).gray900.$,
|
|
@@ -28,7 +27,7 @@ function Chip({ type = exports.ChipTypes.neutral, ...props }) {
|
|
|
28
27
|
}
|
|
29
28
|
exports.Chip = Chip;
|
|
30
29
|
const typeStyles = {
|
|
31
|
-
caution: Css_1.Css.
|
|
30
|
+
caution: Css_1.Css.bgYellow400.$,
|
|
32
31
|
warning: Css_1.Css.bgRed100.$,
|
|
33
32
|
success: Css_1.Css.bgGreen100.$,
|
|
34
33
|
light: Css_1.Css.bgWhite.$,
|