Skip to content

Commit b69e0bc

Browse files
committed
create dev test stories
1 parent 98c3dd0 commit b69e0bc

File tree

4 files changed

+70
-54
lines changed

4 files changed

+70
-54
lines changed

src/Button/Button.dev.stories.tsx

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
import {SearchIcon, TriangleDownIcon, EyeIcon} from '@primer/octicons-react'
2+
import React from 'react'
3+
import {Button} from '.'
4+
5+
export default {
6+
title: 'Components/Button/DevOnly',
7+
}
8+
9+
export const InvisibleVariants = () => {
10+
const count = 4
11+
return (
12+
<div style={{display: 'flex', flexDirection: 'row', gap: '1rem'}}>
13+
<Button variant="invisible">Button</Button>
14+
<Button variant="invisible" leadingIcon={SearchIcon}>
15+
Button
16+
</Button>
17+
<Button variant="invisible" trailingAction={TriangleDownIcon}>
18+
Button
19+
</Button>
20+
<Button variant="invisible">
21+
Button
22+
<Button.Counter>{count}</Button.Counter>
23+
</Button>
24+
<Button variant="invisible" leadingIcon={EyeIcon}>
25+
Button
26+
<Button.Counter>{count}</Button.Counter>
27+
</Button>
28+
<Button variant="invisible" leadingIcon={EyeIcon} trailingAction={TriangleDownIcon}>
29+
Button
30+
<Button.Counter>{count}</Button.Counter>
31+
</Button>
32+
</div>
33+
)
34+
}
35+
36+
export const TestSxProp = () => {
37+
const count = 4
38+
return (
39+
<div style={{display: 'flex', flexDirection: 'row', gap: '1rem'}}>
40+
<Button variant="invisible" sx={{color: 'deeppink'}}>
41+
Pink
42+
</Button>
43+
<Button leadingIcon={SearchIcon} variant="invisible" sx={{color: 'deeppink'}}>
44+
Pink
45+
</Button>
46+
<Button size="small" variant="invisible" sx={{width: 32, height: 32}}>
47+
Custom size
48+
</Button>
49+
<Button size="small" block variant="invisible" sx={{width: 320}}>
50+
Overriden Block
51+
</Button>
52+
<Button>
53+
Watch
54+
<Button.Counter sx={{fontSize: 16}}>{count}</Button.Counter>
55+
</Button>
56+
</div>
57+
)
58+
}
Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {EyeIcon, TriangleDownIcon, HeartIcon, SearchIcon} from '@primer/octicons-react'
1+
import {EyeIcon, TriangleDownIcon, HeartIcon} from '@primer/octicons-react'
22
import React, {useState} from 'react'
33
import {Button} from '.'
44

@@ -41,51 +41,3 @@ export const Small = () => <Button size="small">Default</Button>
4141
export const Medium = () => <Button size="medium">Default</Button>
4242

4343
export const Large = () => <Button size="large">Default</Button>
44-
45-
export const InvisibleVariants = () => {
46-
const count = 4
47-
return (
48-
<div style={{display: 'flex', flexDirection: 'row', gap: '1rem'}}>
49-
<Button variant="invisible">Button</Button>
50-
<Button variant="invisible" leadingIcon={SearchIcon}>
51-
Button
52-
</Button>
53-
<Button variant="invisible" trailingAction={TriangleDownIcon}>
54-
Button
55-
</Button>
56-
<Button variant="invisible">
57-
Button
58-
<Button.Counter>{count}</Button.Counter>
59-
</Button>
60-
<Button variant="invisible" leadingIcon={EyeIcon}>
61-
Button
62-
<Button.Counter>{count}</Button.Counter>
63-
</Button>
64-
<Button variant="invisible" leadingIcon={EyeIcon} trailingAction={TriangleDownIcon}>
65-
Button
66-
<Button.Counter>{count}</Button.Counter>
67-
</Button>
68-
</div>
69-
)
70-
}
71-
72-
export const Test = () => {
73-
const count = 4
74-
return (
75-
<div style={{display: 'flex', flexDirection: 'row', gap: '1rem'}}>
76-
<Button variant="invisible" sx={{color: 'deeppink'}}>
77-
Pink
78-
</Button>
79-
<Button size="small" variant="invisible" sx={{width: 32, height: 32}}>
80-
Custom size
81-
</Button>
82-
<Button size="small" block variant="invisible" sx={{width: 320}}>
83-
Overriden Block
84-
</Button>
85-
<Button>
86-
Watch
87-
<Button.Counter sx={{fontSize: 16}}>{count}</Button.Counter>
88-
</Button>
89-
</div>
90-
)
91-
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import {ChevronDownIcon} from '@primer/octicons-react'
2+
import React from 'react'
3+
import {IconButton} from '.'
4+
5+
export default {
6+
title: 'Components/IconButton/DevOnly',
7+
}
8+
9+
export const CustomSize = () => (
10+
<IconButton aria-label="Expand" variant="primary" size="small" icon={ChevronDownIcon} sx={{width: 16, height: 16}} />
11+
)

src/Button/IconButton.features.stories.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,3 @@ export const Small = () => <IconButton size="small" icon={HeartIcon} aria-label=
2121
export const Medium = () => <IconButton size="medium" icon={HeartIcon} aria-label="Default" />
2222

2323
export const Large = () => <IconButton size="large" icon={HeartIcon} aria-label="Default" />
24-
25-
// remove before merging
26-
export const CustomSize = () => (
27-
<IconButton aria-label="Expand" variant="primary" size="small" icon={ChevronDownIcon} sx={{width: 16, height: 16}} />
28-
)

0 commit comments

Comments
 (0)