|
1 |
| -import { Box, Center, Wrap, WrapItem } from "@chakra-ui/react" |
| 1 | +import { Box, Center, StackDivider, VStack } from "@chakra-ui/react" |
2 | 2 | import { Meta, StoryObj } from "@storybook/react"
|
3 | 3 | import * as React from "react"
|
4 | 4 | import { EthHomeIcon } from "./EthHomeIcon"
|
@@ -90,8 +90,8 @@ import {
|
90 | 90 | } from "./wallets"
|
91 | 91 |
|
92 | 92 | export default {
|
93 |
| - component: Wrap, |
94 |
| -} as Meta<typeof Wrap> |
| 93 | + component: VStack, |
| 94 | +} as Meta<typeof VStack> |
95 | 95 |
|
96 | 96 | const iconsDefinitions = [
|
97 | 97 | CorrectIcon,
|
@@ -178,19 +178,31 @@ const iconsDefinitions = [
|
178 | 178 | iconsDefinitions.sort((a, b) =>
|
179 | 179 | (a?.displayName || "") > (b?.displayName || "") ? 1 : -1
|
180 | 180 | )
|
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> |
190 | 194 | ))
|
191 | 195 |
|
192 |
| -export const IconsList: StoryObj<typeof Wrap> = { |
| 196 | +export const IconsList: StoryObj<typeof VStack> = { |
193 | 197 | 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 | + ) |
195 | 207 | },
|
196 | 208 | }
|
0 commit comments