-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathiconsList.stories.js
44 lines (40 loc) · 1.02 KB
/
iconsList.stories.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import React from "react"
import styled from "styled-components"
import Flex from "@/components/templates/flex"
import { Text, TextBigger } from "@/components/typography"
import { getColor } from "../../theme"
import { iconsList } from "./iconsList"
import { Icon } from "."
const iconsExposed = Object.keys(iconsList)
const Item = styled(Flex)`
&:hover {
background: ${getColor("mainBackgroundDisabled")};
}
`
export const Svgs = () => {
return (
<Flex column padding={[10, 4, 2]} gap={4}>
<TextBigger>Click item to copy icon name</TextBigger>
<Flex flexWrap>
{iconsExposed.map(name => (
<Item
onClick={() => alert(name)}
cursor="pointer"
key={name}
padding={[3, 3]}
flex="grow"
basis="33%"
justifyContent="start"
gap={2}
>
<Icon name={name} />
<Text>{name}</Text>
</Item>
))}
</Flex>
</Flex>
)
}
export default {
component: Icon,
}