Skip to content

Commit b3b7e02

Browse files
committed
update wrap to VStack in icon story
1 parent 3ee098c commit b3b7e02

File tree

1 file changed

+26
-14
lines changed

1 file changed

+26
-14
lines changed

src/components/icons/Icons.stories.tsx

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Box, Center, Wrap, WrapItem } from "@chakra-ui/react"
1+
import { Box, Center, StackDivider, VStack } from "@chakra-ui/react"
22
import { Meta, StoryObj } from "@storybook/react"
33
import * as React from "react"
44
import { EthHomeIcon } from "./EthHomeIcon"
@@ -90,8 +90,8 @@ import {
9090
} from "./wallets"
9191

9292
export default {
93-
component: Wrap,
94-
} as Meta<typeof Wrap>
93+
component: VStack,
94+
} as Meta<typeof VStack>
9595

9696
const iconsDefinitions = [
9797
CorrectIcon,
@@ -178,19 +178,31 @@ const iconsDefinitions = [
178178
iconsDefinitions.sort((a, b) =>
179179
(a?.displayName || "") > (b?.displayName || "") ? 1 : -1
180180
)
181-
const wrapItems = iconsDefinitions.map((IconDef) => (
182-
<WrapItem key={IconDef.displayName}>
183-
<Box border="1px" borderStyle="solid" borderColor="border" p={1}>
184-
<Center>
185-
<IconDef />
186-
</Center>
187-
<Center>{IconDef.displayName}</Center>
188-
</Box>
189-
</WrapItem>
181+
const items = iconsDefinitions.map((IconDef) => (
182+
<Box
183+
key={IconDef.displayName}
184+
border="1px"
185+
borderStyle="solid"
186+
borderColor="border"
187+
p={1}
188+
>
189+
<Center>
190+
<IconDef />
191+
</Center>
192+
<Center>{IconDef.displayName}</Center>
193+
</Box>
190194
))
191195

192-
export const IconsList: StoryObj<typeof Wrap> = {
196+
export const IconsList: StoryObj<typeof VStack> = {
193197
render: () => {
194-
return <Wrap>{wrapItems}</Wrap>
198+
return (
199+
<VStack
200+
divider={<StackDivider borderColor="gray.200" />}
201+
spacing={4}
202+
align="stretch"
203+
>
204+
{items}
205+
</VStack>
206+
)
195207
},
196208
}

0 commit comments

Comments
 (0)