Skip to content

Commit f777309

Browse files
committed
update storybook
1 parent 3a7782f commit f777309

File tree

3 files changed

+1028
-766
lines changed

3 files changed

+1028
-766
lines changed

packages/components/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@
4545
"yarn": "^1.21.1"
4646
},
4747
"devDependencies": {
48-
"@storybook/addon-a11y": "^5.2.8",
49-
"@storybook/addon-actions": "^5.2.8",
50-
"@storybook/addon-knobs": "^5.2.8",
51-
"@storybook/addon-storysource": "^5.2.8",
52-
"@storybook/addon-viewport": "^5.2.8",
53-
"@storybook/react": "^5.2.8",
48+
"@storybook/addon-a11y": "^5.3.2",
49+
"@storybook/addon-actions": "^5.3.2",
50+
"@storybook/addon-knobs": "^5.3.2",
51+
"@storybook/addon-storysource": "^5.3.2",
52+
"@storybook/addon-viewport": "^5.3.2",
53+
"@storybook/react": "^5.3.2",
5454
"@types/color": "3.0.1",
5555
"@types/lodash": "^4.14.149",
5656
"@types/styled-components": "^4.4.1",

packages/components/src/components/Select/index.tsx

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,36 @@ import { Text } from '../Text';
77
import { Element } from '../Element';
88

99
// Svg used for the icon
10-
const svg = color =>
10+
const svg = (color: string) =>
1111
`"data:image/svg+xml,%3Csvg width='8' height='24' viewBox='0 0 8 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.00006 17L1 13L7 13L4.00006 17Z' fill='%23${
1212
color.split('#')[1]
1313
}'/%3E%3Cpath d='M3.99994 7L7 11H1L3.99994 7Z' fill='%23${
1414
color.split('#')[1]
1515
}'/%3E%3C/svg%3E%0A"`;
1616

17-
export const SelectComponent = styled.select<{ icon?: boolean }>(props =>
18-
css({
19-
width: '100%',
20-
height: 6,
21-
paddingX: 2,
22-
paddingLeft: props.icon ? 6 : 2,
23-
fontSize: 3,
24-
borderRadius: 'small',
25-
backgroundColor: 'input.background',
26-
border: '1px solid',
27-
borderColor: 'input.border',
28-
color: 'input.placeholderForeground',
29-
appearance: 'none',
30-
backgroundImage: `url(${svg(
31-
props.theme.colors.input.placeholderForeground
32-
)})`,
33-
backgroundPosition: 'calc(100% - 8px) center',
34-
backgroundRepeat: 'no-repeat',
17+
export const SelectComponent = styled.select<{ icon?: boolean }>(
18+
({ icon, theme }) =>
19+
css({
20+
width: '100%',
21+
height: 6,
22+
paddingX: 2,
23+
paddingLeft: icon ? 6 : 2,
24+
fontSize: 3,
25+
borderRadius: 'small',
26+
backgroundColor: 'input.background',
27+
border: '1px solid',
28+
borderColor: 'input.border',
29+
color: 'input.placeholderForeground',
30+
appearance: 'none',
31+
backgroundImage: `url(${svg(theme.colors.input.placeholderForeground)})`,
32+
backgroundPosition: 'calc(100% - 8px) center',
33+
backgroundRepeat: 'no-repeat',
3534

36-
':hover': {
37-
color: 'input.foreground',
38-
backgroundImage: `url(${svg(props.theme.colors.input.foreground)})`,
39-
},
40-
})
35+
':hover': {
36+
color: 'input.foreground',
37+
backgroundImage: `url(${svg(theme.colors.input.foreground)})`,
38+
},
39+
})
4140
);
4241

4342
const IconWrapper = styled(Element)(

0 commit comments

Comments
 (0)