Skip to content

Commit 9c4ebab

Browse files
committed
show icons as a grid
1 parent d5879e0 commit 9c4ebab

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

src/components/icons/Icons.stories.tsx

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
import { Box, Center, StackDivider, VStack } from "@chakra-ui/react"
1+
import {
2+
Box,
3+
Center,
4+
Flex,
5+
SimpleGrid,
6+
StackDivider,
7+
VStack,
8+
} from "@chakra-ui/react"
29
import { Meta, StoryObj } from "@storybook/react"
310
import * as React from "react"
411
import { EthHomeIcon } from "./EthHomeIcon"
@@ -179,30 +186,24 @@ iconsDefinitions.sort((a, b) =>
179186
(a?.displayName || "") > (b?.displayName || "") ? 1 : -1
180187
)
181188
const items = iconsDefinitions.map((IconDef) => (
182-
<Box
189+
<Flex
183190
key={IconDef.displayName}
191+
direction="column"
192+
gap={4}
193+
p={4}
184194
border="1px"
185195
borderStyle="solid"
186-
borderColor="border"
187-
p={1}
196+
borderColor="background.highlight"
188197
>
189198
<Center>
190-
<IconDef />
199+
<IconDef w="50px" h="50px" />
191200
</Center>
192201
<Center>{IconDef.displayName}</Center>
193-
</Box>
202+
</Flex>
194203
))
195204

196205
export const IconsList: StoryObj<typeof VStack> = {
197206
render: () => {
198-
return (
199-
<VStack
200-
divider={<StackDivider borderColor="gray.200" />}
201-
spacing={4}
202-
align="stretch"
203-
>
204-
{items}
205-
</VStack>
206-
)
207+
return <SimpleGrid columns={[2, 2, 3, 5]}>{items}</SimpleGrid>
207208
},
208209
}

0 commit comments

Comments
 (0)