@drivy/cobalt 3.0.1 → 3.0.2
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import cx from 'classnames';
|
|
3
3
|
|
|
4
|
-
const MarketingNote = ({ children, title, icon, className, variant, }) => (jsxs("div", { className: cx(`cobalt-marketing-note cobalt-marketing-note--${variant}`, className), children: [icon && (jsx("div", { className: "cobalt-marketing-note__icon-container", children: icon })), jsxs("div", { className: "
|
|
4
|
+
const MarketingNote = ({ children, title, icon, className, variant, compact = false, }) => (jsxs("div", { className: cx(`cobalt-marketing-note cobalt-marketing-note--${variant}`, className, { "cobalt-marketing-note--compact": compact }), children: [icon && (jsx("div", { className: "cobalt-marketing-note__icon-container", children: icon })), jsxs("div", { className: "cobalt-marketing-note__content", children: [title && jsx("div", { className: "c-font-bold", children: title }), children] })] }));
|
|
5
5
|
|
|
6
6
|
export { MarketingNote };
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/MarketingNote/index.tsx"],"sourcesContent":["import cx from \"classnames\"\nimport type { PropsWithChildren } from \"react\"\n\nexport type MarketingNoteProps = PropsWithChildren<{\n variant: \"success\" | \"tertiary\"\n title?: string\n icon?: React.JSX.Element\n className?: string\n}>\n\nexport const MarketingNote = ({\n children,\n title,\n icon,\n className,\n variant,\n}: MarketingNoteProps) => (\n <div\n className={cx(\n `cobalt-marketing-note cobalt-marketing-note--${variant}`,\n className,\n )}\n >\n {icon && (\n <div className=\"cobalt-marketing-note__icon-container\">{icon}</div>\n )}\n\n <div className=\"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/MarketingNote/index.tsx"],"sourcesContent":["import cx from \"classnames\"\nimport type { PropsWithChildren } from \"react\"\n\nexport type MarketingNoteProps = PropsWithChildren<{\n variant: \"success\" | \"tertiary\"\n title?: string\n icon?: React.JSX.Element\n compact?: boolean\n className?: string\n}>\n\nexport const MarketingNote = ({\n children,\n title,\n icon,\n className,\n variant,\n compact = false,\n}: MarketingNoteProps) => (\n <div\n className={cx(\n `cobalt-marketing-note cobalt-marketing-note--${variant}`,\n className,\n { \"cobalt-marketing-note--compact\": compact },\n )}\n >\n {icon && (\n <div className=\"cobalt-marketing-note__icon-container\">{icon}</div>\n )}\n\n <div className=\"cobalt-marketing-note__content\">\n {title && <div className=\"c-font-bold\">{title}</div>}\n {children}\n </div>\n </div>\n)\n"],"names":["_jsxs","_jsx"],"mappings":";;;AAWO,MAAM,aAAa,GAAG,CAAC,EAC5B,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,SAAS,EACT,OAAO,EACP,OAAO,GAAG,KAAK,GACI,MACnBA,IACE,CAAA,KAAA,EAAA,EAAA,SAAS,EAAE,EAAE,CACX,CAAgD,6CAAA,EAAA,OAAO,CAAE,CAAA,EACzD,SAAS,EACT,EAAE,gCAAgC,EAAE,OAAO,EAAE,CAC9C,EAAA,QAAA,EAAA,CAEA,IAAI,KACHC,GAAK,CAAA,KAAA,EAAA,EAAA,SAAS,EAAC,uCAAuC,EAAA,QAAA,EAAE,IAAI,EAAA,CAAO,CACpE,EAEDD,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,gCAAgC,EAC5C,QAAA,EAAA,CAAA,KAAK,IAAIC,GAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,aAAa,EAAE,QAAA,EAAA,KAAK,GAAO,EACnD,QAAQ,CACL,EAAA,CAAA,CAAA,EAAA,CACF;;;;"}
|
package/package.json
CHANGED
|
@@ -5,6 +5,28 @@
|
|
|
5
5
|
align-items: flex-start;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
+
.cobalt-marketing-note__icon-container {
|
|
9
|
+
--icon-container-size: 28px;
|
|
10
|
+
|
|
11
|
+
display: flex;
|
|
12
|
+
|
|
13
|
+
justify-content: center;
|
|
14
|
+
align-items: center;
|
|
15
|
+
|
|
16
|
+
width: var(--icon-container-size);
|
|
17
|
+
height: var(--icon-container-size);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.cobalt-marketing-note__icon-container .cobalt-Icon {
|
|
21
|
+
width: 100%;
|
|
22
|
+
height: 100%;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.cobalt-marketing-note__content {
|
|
26
|
+
flex: 1 1 0%;
|
|
27
|
+
align-self: center;
|
|
28
|
+
}
|
|
29
|
+
|
|
8
30
|
.cobalt-marketing-note.cobalt-marketing-note--success {
|
|
9
31
|
@apply c-bg-successContainer c-text-onSuccessContainer;
|
|
10
32
|
|
|
@@ -21,19 +43,12 @@
|
|
|
21
43
|
}
|
|
22
44
|
}
|
|
23
45
|
|
|
24
|
-
.cobalt-marketing-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
display: flex;
|
|
28
|
-
|
|
29
|
-
justify-content: center;
|
|
30
|
-
align-items: center;
|
|
46
|
+
.cobalt-marketing-note.cobalt-marketing-note--compact {
|
|
47
|
+
@apply c-rounded-lg c-py-xs;
|
|
31
48
|
|
|
32
|
-
|
|
33
|
-
height: var(--icon-container-size);
|
|
34
|
-
}
|
|
49
|
+
padding-left: 0.75rem;
|
|
35
50
|
|
|
36
|
-
.cobalt-marketing-note__icon-container
|
|
37
|
-
|
|
38
|
-
|
|
51
|
+
.cobalt-marketing-note__icon-container {
|
|
52
|
+
--icon-container-size: 20px;
|
|
53
|
+
}
|
|
39
54
|
}
|
|
@@ -3,6 +3,7 @@ export type MarketingNoteProps = PropsWithChildren<{
|
|
|
3
3
|
variant: "success" | "tertiary";
|
|
4
4
|
title?: string;
|
|
5
5
|
icon?: React.JSX.Element;
|
|
6
|
+
compact?: boolean;
|
|
6
7
|
className?: string;
|
|
7
8
|
}>;
|
|
8
|
-
export declare const MarketingNote: ({ children, title, icon, className, variant, }: MarketingNoteProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const MarketingNote: ({ children, title, icon, className, variant, compact, }: MarketingNoteProps) => import("react/jsx-runtime").JSX.Element;
|