@gisce/react-ooui 1.1.52 → 1.1.53
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/react-ooui.es.js +2 -2
- package/dist/react-ooui.es.js.map +1 -1
- package/dist/react-ooui.umd.js +1 -1
- package/dist/react-ooui.umd.js.map +1 -1
- package/dist/widgets/base/Separator.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/stories/Separator.stories.tsx +21 -0
- package/src/stories/containers/Group.stories.tsx +12 -0
- package/src/widgets/base/Separator.tsx +6 -4
- package/src/widgets/containers/Group.tsx +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Separator.d.ts","sourceRoot":"","sources":["Separator.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,aAAa,CAAC;AAGzD,aAAK,KAAK,GAAG;IACX,IAAI,EAAE,aAAa,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,KAAK,
|
|
1
|
+
{"version":3,"file":"Separator.d.ts","sourceRoot":"","sources":["Separator.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,aAAa,CAAC;AAGzD,aAAK,KAAK,GAAG;IACX,IAAI,EAAE,aAAa,CAAC;CACrB,CAAC;AAEF,eAAO,MAAM,SAAS,UAAW,KAAK,gBAgBrC,CAAC"}
|
package/package.json
CHANGED
|
@@ -20,6 +20,27 @@ export const Default = (): React.ReactElement => {
|
|
|
20
20
|
);
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
+
export const WithoutText = (): React.ReactElement => {
|
|
24
|
+
const ooui = new SeparatorOoui({
|
|
25
|
+
});
|
|
26
|
+
return (
|
|
27
|
+
<LocaleProvider lang="en_US">
|
|
28
|
+
<Separator ooui={ooui} showLabel />
|
|
29
|
+
</LocaleProvider>
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export const OnlyIcon = (): React.ReactElement => {
|
|
34
|
+
const ooui = new SeparatorOoui({
|
|
35
|
+
icon: "home"
|
|
36
|
+
});
|
|
37
|
+
return (
|
|
38
|
+
<LocaleProvider lang="en_US">
|
|
39
|
+
<Separator ooui={ooui} showLabel />
|
|
40
|
+
</LocaleProvider>
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
|
|
23
44
|
export const WithIcon = (): React.ReactElement => {
|
|
24
45
|
const ooui = new SeparatorOoui({
|
|
25
46
|
string: "General",
|
|
@@ -73,3 +73,15 @@ export const WithIcon = (): React.ReactElement => {
|
|
|
73
73
|
</LocaleProvider>
|
|
74
74
|
);
|
|
75
75
|
};
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
export const OnlyIcon = (): React.ReactElement => {
|
|
79
|
+
const ooui = new GroupOoui({
|
|
80
|
+
icon: "home"
|
|
81
|
+
});
|
|
82
|
+
return (
|
|
83
|
+
<LocaleProvider lang="en_US">
|
|
84
|
+
<Group ooui={ooui} />
|
|
85
|
+
</LocaleProvider>
|
|
86
|
+
);
|
|
87
|
+
};
|
|
@@ -15,10 +15,12 @@ export const Separator = (props: Props) => {
|
|
|
15
15
|
|
|
16
16
|
return (
|
|
17
17
|
<Divider orientation="left" className="text-sm">
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
{ (Icon || label) &&
|
|
19
|
+
<Space>
|
|
20
|
+
{Icon ? <Icon /> : null}
|
|
21
|
+
{label}
|
|
22
|
+
</Space>
|
|
23
|
+
}
|
|
22
24
|
</Divider>
|
|
23
25
|
);
|
|
24
26
|
};
|