Skip to content

Commit f695118

Browse files
committed
feat: more on Typo
1 parent 7e25474 commit f695118

File tree

3 files changed

+40
-2
lines changed

3 files changed

+40
-2
lines changed

example/src/stories/Typo.stories.tsx

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,27 @@ export default {
1313
variant: {
1414
control: {
1515
type: 'select',
16-
options: ['description', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'],
16+
optopns: [
17+
'default',
18+
'description',
19+
'error',
20+
'info',
21+
'progress',
22+
'success',
23+
'warn',
24+
'h1',
25+
'h2',
26+
'h3',
27+
'h4',
28+
'h5',
29+
'h6',
30+
'small',
31+
'smaller',
32+
'tabular',
33+
'readable',
34+
'no-ligatures',
35+
'no-margin',
36+
],
1737
},
1838
description: 'The variant of the text',
1939
},

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@solved-ac/ui-react",
3-
"version": "0.0.1-alpha.25",
3+
"version": "0.0.1-alpha.26",
44
"description": "React component library used by solved.ac",
55
"author": "shiftpsh",
66
"license": "MIT",

src/components/Typo.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,21 @@ const variants = {
1010
description: css`
1111
color: ${({ theme }) => theme.color.text.secondary.main};
1212
`,
13+
error: css`
14+
color: ${({ theme }) => theme.color.status.error};
15+
`,
16+
info: css`
17+
color: ${({ theme }) => theme.color.status.info};
18+
`,
19+
progress: css`
20+
color: ${({ theme }) => theme.color.status.progress};
21+
`,
22+
success: css`
23+
color: ${({ theme }) => theme.color.status.success};
24+
`,
25+
warn: css`
26+
color: ${({ theme }) => theme.color.status.warn};
27+
`,
1328
h1: css`
1429
display: block;
1530
font-weight: 800;
@@ -84,6 +99,9 @@ const variants = {
8499
'no-ligatures': css`
85100
font-variant-ligatures: none;
86101
`,
102+
'no-margin': css`
103+
margin: 0;
104+
`,
87105
} as const
88106

89107
export type TypoVariant = keyof typeof variants

0 commit comments

Comments
 (0)