Skip to content

Commit 65bf1a7

Browse files
committed
📝 Add 'auto' variant docs to Button
1 parent c602f69 commit 65bf1a7

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

.internal/demo-theme.js

+4
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ export const theme = {
9999
success: {
100100
background: 'lime',
101101
color: 'white'
102+
},
103+
inverted: {
104+
background: 'white',
105+
color: 'black',
102106
}
103107
},
104108
Input,

docs/button.mdx

+15-9
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ menu: Primitives
66

77
import { Playground } from 'docz'
88
import { PropsTable } from '../.internal/props-table'
9-
import { Button, Link } from '../src'
9+
import { Button, ThemeDefaults, Link } from '../src'
1010

1111
# Button
1212

@@ -108,14 +108,6 @@ const myTheme = {
108108
</Button>
109109
</Playground>
110110

111-
Auto is same as `default`, but dynamic (see [ThemeDefaults](/theme-defaults))
112-
113-
<Playground>
114-
<Button variant='auto'>
115-
Auto
116-
</Button>
117-
</Playground>
118-
119111
<Playground>
120112
<Button variant='danger'>
121113
Danger
@@ -128,6 +120,20 @@ Auto is same as `default`, but dynamic (see [ThemeDefaults](/theme-defaults))
128120
</Button>
129121
</Playground>
130122

123+
Variant `'auto'` is dynamic, by default same as `'default'` (see [ThemeDefaults](/theme-defaults))
124+
125+
<Playground>
126+
<Button variant='auto' mr={1}>
127+
Auto
128+
</Button>
129+
130+
<ThemeDefaults buttonStyle='inverted'>
131+
<Button variant='auto'>
132+
Auto
133+
</Button>
134+
</ThemeDefaults>
135+
</Playground>
136+
131137
## Props
132138

133139
<PropsTable of={Button} />

0 commit comments

Comments
 (0)