Skip to content

Commit b896348

Browse files
authored
feat: inherit cross size variant option (#25)
1 parent 0a539fb commit b896348

File tree

6 files changed

+9
-4
lines changed

6 files changed

+9
-4
lines changed

src/components/checkbox/Checkbox.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default {
1313
},
1414
size: {
1515
control: "select",
16-
options: ["50", "100", "200", "300", "400", "500", "600"],
16+
options: ["Inherit", "50", "100", "200", "300", "400", "500", "600"],
1717
},
1818
},
1919
} as ComponentMeta<typeof Checkbox>;

src/components/icon/Icons.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export default {
2222
argTypes: {
2323
size: {
2424
control: "select",
25-
options: ["50", "100", "200", "300", "400", "500", "600"],
25+
options: ["Inherit", "50", "100", "200", "300", "400", "500", "600"],
2626
},
2727
},
2828
} as ComponentMeta<typeof Icon>;

src/components/radio-button/RadioButton.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default {
1313
},
1414
size: {
1515
control: "select",
16-
options: ["50", "100", "200", "300", "400", "500", "600"],
16+
options: ["Inherit", "50", "100", "200", "300", "400", "500", "600"],
1717
},
1818
},
1919
} as ComponentMeta<typeof RadioButton>;

src/components/spinner/Spinner.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default {
1616
},
1717
size: {
1818
control: "select",
19-
options: ["50", "100", "200", "300", "400", "500", "600"],
19+
options: ["Inherit", "50", "100", "200", "300", "400", "500", "600"],
2020
},
2121
},
2222
} as ComponentMeta<typeof Spinner>;

src/components/variant.css.ts

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ export const RadiiVariant = {
2323
};
2424

2525
export const CrossSizeVariant = {
26+
Inherit: style({
27+
width: config.size.XInherit,
28+
height: config.size.XInherit,
29+
}),
2630
"50": style({
2731
width: config.size.X50,
2832
height: config.size.X50,

src/theme/config.css.ts

+1
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ export const [configClass, config] = createTheme({
126126
E400: `0px 4px 26px -6px ${color.Other.Shadow}`,
127127
},
128128
size: {
129+
XInherit: "1em",
129130
X50: toRem(16),
130131
X100: toRem(18),
131132
X200: toRem(20),

0 commit comments

Comments
 (0)