2022-09-20 19:15:14 +02:00
|
|
|
import React, { useState } from 'react';
|
2023-05-25 22:53:31 +02:00
|
|
|
import { StoryFn, Meta } from '@storybook/react';
|
2023-04-04 18:48:04 +02:00
|
|
|
|
2022-09-20 19:15:14 +02:00
|
|
|
import {
|
2023-02-02 21:15:26 +01:00
|
|
|
AlignItems,
|
2023-05-25 22:53:31 +02:00
|
|
|
Display,
|
2023-02-02 21:15:26 +01:00
|
|
|
IconColor,
|
2023-05-25 22:53:31 +02:00
|
|
|
FlexDirection,
|
2023-02-02 21:15:26 +01:00
|
|
|
JustifyContent,
|
|
|
|
TextVariant,
|
2023-05-25 22:53:31 +02:00
|
|
|
FlexWrap,
|
2023-05-23 20:05:50 +02:00
|
|
|
TextAlign,
|
2023-02-02 21:15:26 +01:00
|
|
|
BackgroundColor,
|
|
|
|
BorderColor,
|
|
|
|
Color,
|
2023-02-07 19:07:50 +01:00
|
|
|
BorderRadius,
|
2022-09-20 19:15:14 +02:00
|
|
|
} from '../../../helpers/constants/design-system';
|
2022-11-23 18:58:43 +01:00
|
|
|
|
2022-09-20 19:15:14 +02:00
|
|
|
import Box from '../../ui/box/box';
|
|
|
|
|
2022-11-23 18:58:43 +01:00
|
|
|
import {
|
|
|
|
ButtonIcon,
|
|
|
|
ButtonLink,
|
|
|
|
Label,
|
|
|
|
Text,
|
|
|
|
TextField,
|
|
|
|
TextFieldSearch,
|
2023-04-04 18:48:04 +02:00
|
|
|
TEXT_FIELD_SIZES,
|
2023-04-12 17:55:24 +02:00
|
|
|
ButtonIconSize,
|
2023-04-04 18:48:04 +02:00
|
|
|
BUTTON_LINK_SIZES,
|
2022-11-23 18:58:43 +01:00
|
|
|
} from '..';
|
2022-09-20 19:15:14 +02:00
|
|
|
|
2023-04-04 18:48:04 +02:00
|
|
|
import { Icon } from './icon';
|
|
|
|
import { IconName, IconSize } from './icon.types';
|
2022-09-20 19:15:14 +02:00
|
|
|
|
2023-04-04 18:48:04 +02:00
|
|
|
import README from './README.mdx';
|
2022-09-20 19:15:14 +02:00
|
|
|
|
|
|
|
export default {
|
|
|
|
title: 'Components/ComponentLibrary/Icon',
|
|
|
|
component: Icon,
|
|
|
|
parameters: {
|
|
|
|
docs: {
|
|
|
|
page: README,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
args: {
|
2023-04-04 18:48:04 +02:00
|
|
|
name: IconName.AddSquare,
|
2023-02-02 21:15:26 +01:00
|
|
|
color: IconColor.inherit,
|
2023-04-04 18:48:04 +02:00
|
|
|
size: IconSize.Md,
|
2022-09-20 19:15:14 +02:00
|
|
|
},
|
2023-05-25 22:53:31 +02:00
|
|
|
} as Meta<typeof Icon>;
|
2022-09-20 19:15:14 +02:00
|
|
|
|
2023-05-25 22:53:31 +02:00
|
|
|
export const DefaultStory: StoryFn<typeof Icon> = (args) => {
|
2022-09-20 19:15:14 +02:00
|
|
|
const [search, setSearch] = useState('');
|
2023-04-04 18:48:04 +02:00
|
|
|
const iconList = Object.keys(IconName)
|
2022-09-20 19:15:14 +02:00
|
|
|
.filter(
|
|
|
|
(item) =>
|
|
|
|
search === '' ||
|
|
|
|
item.toLowerCase().includes(search.toLowerCase().replace(' ', '_')),
|
|
|
|
)
|
|
|
|
.sort();
|
|
|
|
|
|
|
|
const handleSearch = (e) => {
|
|
|
|
setSearch(e.target.value);
|
|
|
|
};
|
|
|
|
|
2022-11-23 18:58:43 +01:00
|
|
|
const handleOnClear = () => {
|
|
|
|
setSearch('');
|
|
|
|
};
|
|
|
|
|
2022-09-20 19:15:14 +02:00
|
|
|
return (
|
|
|
|
<>
|
2023-02-02 21:15:26 +01:00
|
|
|
<Text as="h2" marginBottom={2} variant={TextVariant.headingMd}>
|
2022-09-20 19:15:14 +02:00
|
|
|
Icon search
|
|
|
|
</Text>
|
|
|
|
<Box
|
2023-05-25 22:53:31 +02:00
|
|
|
display={Display.Grid}
|
2022-09-20 19:15:14 +02:00
|
|
|
gap={2}
|
2022-11-23 18:58:43 +01:00
|
|
|
style={{
|
|
|
|
gridTemplateColumns: 'repeat(auto-fill, minmax(180px, 1fr))',
|
|
|
|
}}
|
2022-09-20 19:15:14 +02:00
|
|
|
>
|
2022-11-23 18:58:43 +01:00
|
|
|
<Box
|
|
|
|
style={{ gridColumnStart: 1, gridColumnEnd: 3 }}
|
2023-05-25 22:53:31 +02:00
|
|
|
display={Display.Flex}
|
|
|
|
flexDirection={FlexDirection.Column}
|
2022-11-23 18:58:43 +01:00
|
|
|
>
|
|
|
|
{/* TODO replace with FormTextField */}
|
2023-04-04 18:48:04 +02:00
|
|
|
<Label htmlFor="icon-search">IconName</Label>
|
2022-11-23 18:58:43 +01:00
|
|
|
<TextFieldSearch
|
|
|
|
id="icon-search"
|
|
|
|
marginBottom={4}
|
|
|
|
onChange={handleSearch}
|
|
|
|
clearButtonOnClick={handleOnClear}
|
|
|
|
value={search}
|
|
|
|
placeholder="Search icon name"
|
|
|
|
/>
|
|
|
|
</Box>
|
2022-09-20 19:15:14 +02:00
|
|
|
</Box>
|
2022-11-23 18:58:43 +01:00
|
|
|
{iconList.length > 0 ? (
|
|
|
|
<Box
|
2023-05-25 22:53:31 +02:00
|
|
|
display={Display.Grid}
|
2022-11-23 18:58:43 +01:00
|
|
|
gap={2}
|
|
|
|
style={{
|
|
|
|
gridTemplateColumns: 'repeat(auto-fill, minmax(180px, 1fr))',
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
{iconList.map((item) => {
|
|
|
|
return (
|
|
|
|
<Box
|
2023-02-02 21:15:26 +01:00
|
|
|
borderColor={BorderColor.borderMuted}
|
2023-04-04 18:48:04 +02:00
|
|
|
borderRadius={BorderRadius.MD}
|
2023-05-25 22:53:31 +02:00
|
|
|
display={Display.Flex}
|
|
|
|
flexDirection={FlexDirection.Column}
|
2023-02-02 21:15:26 +01:00
|
|
|
alignItems={AlignItems.center}
|
|
|
|
justifyContent={JustifyContent.center}
|
2022-11-23 18:58:43 +01:00
|
|
|
padding={4}
|
|
|
|
key={item}
|
|
|
|
>
|
2023-04-04 18:48:04 +02:00
|
|
|
<Icon marginBottom={2} {...args} name={IconName[item]} />
|
2022-11-23 18:58:43 +01:00
|
|
|
<TextField
|
|
|
|
placeholder={item}
|
|
|
|
value={item}
|
|
|
|
readOnly
|
2023-04-04 18:48:04 +02:00
|
|
|
size={TEXT_FIELD_SIZES.SM}
|
2022-11-23 18:58:43 +01:00
|
|
|
inputProps={{
|
2023-02-02 21:15:26 +01:00
|
|
|
variant: TextVariant.bodyXs,
|
2023-05-23 20:05:50 +02:00
|
|
|
textAlign: TextAlign.Center,
|
2022-11-23 18:58:43 +01:00
|
|
|
}}
|
2023-02-02 21:15:26 +01:00
|
|
|
backgroundColor={BackgroundColor.backgroundAlternative}
|
2023-02-16 00:43:51 +01:00
|
|
|
endAccessory={
|
2022-11-23 18:58:43 +01:00
|
|
|
<ButtonIcon
|
2023-04-04 18:48:04 +02:00
|
|
|
iconName={IconName.Copy}
|
2023-04-12 17:55:24 +02:00
|
|
|
size={ButtonIconSize.Sm}
|
2023-02-02 21:15:26 +01:00
|
|
|
color={IconColor.iconAlternative}
|
2022-11-23 18:58:43 +01:00
|
|
|
ariaLabel="Copy to clipboard"
|
|
|
|
title="Copy to clipboard"
|
|
|
|
onClick={() => {
|
|
|
|
const tempEl = document.createElement('textarea');
|
|
|
|
tempEl.value = item;
|
|
|
|
document.body.appendChild(tempEl);
|
|
|
|
tempEl.select();
|
|
|
|
document.execCommand('copy');
|
|
|
|
document.body.removeChild(tempEl);
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
/>
|
|
|
|
</Box>
|
|
|
|
);
|
|
|
|
})}
|
|
|
|
</Box>
|
|
|
|
) : (
|
|
|
|
<Text>
|
|
|
|
No matches. Please try again or ask in the{' '}
|
|
|
|
<ButtonLink
|
2023-04-04 18:48:04 +02:00
|
|
|
size={BUTTON_LINK_SIZES.INHERIT}
|
2023-02-02 21:15:26 +01:00
|
|
|
color={Color.primaryDefault}
|
2022-11-23 18:58:43 +01:00
|
|
|
href="https://consensys.slack.com/archives/C0354T27M5M"
|
|
|
|
target="_blank"
|
|
|
|
>
|
|
|
|
#metamask-design-system
|
|
|
|
</ButtonLink>{' '}
|
|
|
|
channel on slack.
|
|
|
|
</Text>
|
|
|
|
)}
|
2022-09-20 19:15:14 +02:00
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|
2022-11-23 18:58:43 +01:00
|
|
|
DefaultStory.storyName = 'Default';
|
|
|
|
|
2023-05-25 22:53:31 +02:00
|
|
|
export const Name: StoryFn<typeof Icon> = (args) => (
|
2022-11-23 18:58:43 +01:00
|
|
|
<>
|
2023-05-25 22:53:31 +02:00
|
|
|
<Box display={Display.Flex} flexWrap={FlexWrap.Wrap} gap={2}>
|
2023-04-04 18:48:04 +02:00
|
|
|
{Object.keys(IconName).map((item) => {
|
2022-11-23 18:58:43 +01:00
|
|
|
return (
|
|
|
|
<Box
|
2023-02-02 21:15:26 +01:00
|
|
|
borderColor={BorderColor.borderMuted}
|
2023-04-04 18:48:04 +02:00
|
|
|
borderRadius={BorderRadius.MD}
|
2023-05-25 22:53:31 +02:00
|
|
|
display={Display.Flex}
|
|
|
|
flexDirection={FlexDirection.Column}
|
2023-02-02 21:15:26 +01:00
|
|
|
alignItems={AlignItems.center}
|
|
|
|
justifyContent={JustifyContent.center}
|
2022-11-23 18:58:43 +01:00
|
|
|
padding={4}
|
|
|
|
key={item}
|
|
|
|
>
|
2023-04-04 18:48:04 +02:00
|
|
|
<Icon {...args} name={IconName[item]} />
|
2022-11-23 18:58:43 +01:00
|
|
|
</Box>
|
|
|
|
);
|
|
|
|
})}
|
|
|
|
</Box>
|
|
|
|
</>
|
|
|
|
);
|
2022-09-20 19:15:14 +02:00
|
|
|
|
2023-05-25 22:53:31 +02:00
|
|
|
export const SizeStory: StoryFn<typeof Icon> = (args) => (
|
2022-09-29 17:33:34 +02:00
|
|
|
<>
|
|
|
|
<Box
|
2023-05-25 22:53:31 +02:00
|
|
|
display={Display.Flex}
|
2023-02-02 21:15:26 +01:00
|
|
|
alignItems={AlignItems.baseline}
|
2022-09-29 17:33:34 +02:00
|
|
|
gap={1}
|
|
|
|
marginBottom={4}
|
|
|
|
>
|
2023-04-04 18:48:04 +02:00
|
|
|
<Icon {...args} size={IconSize.Xs} />
|
|
|
|
<Icon {...args} size={IconSize.Sm} />
|
|
|
|
<Icon {...args} size={IconSize.Md} />
|
|
|
|
<Icon {...args} size={IconSize.Lg} />
|
|
|
|
<Icon {...args} size={IconSize.Xl} />
|
2022-09-29 17:33:34 +02:00
|
|
|
</Box>
|
2023-02-22 23:42:50 +01:00
|
|
|
<Text variant={TextVariant.displayMd}>
|
|
|
|
inherits the font-size of the parent element.{' '}
|
2023-04-04 18:48:04 +02:00
|
|
|
<Icon {...args} size={IconSize.Inherit} />
|
2023-02-22 23:42:50 +01:00
|
|
|
</Text>
|
|
|
|
<Text variant={TextVariant.headingLg}>
|
|
|
|
inherits the font-size of the parent element.{' '}
|
2023-04-04 18:48:04 +02:00
|
|
|
<Icon {...args} size={IconSize.Inherit} />
|
2023-02-22 23:42:50 +01:00
|
|
|
</Text>
|
|
|
|
<Text variant={TextVariant.headingMd}>
|
|
|
|
inherits the font-size of the parent element.{' '}
|
2023-04-04 18:48:04 +02:00
|
|
|
<Icon {...args} size={IconSize.Inherit} />
|
2023-02-22 23:42:50 +01:00
|
|
|
</Text>
|
|
|
|
<Text variant={TextVariant.headingSm}>
|
|
|
|
inherits the font-size of the parent element.{' '}
|
2023-04-04 18:48:04 +02:00
|
|
|
<Icon {...args} size={IconSize.Inherit} />
|
2023-02-22 23:42:50 +01:00
|
|
|
</Text>
|
|
|
|
<Text variant={TextVariant.bodyLgMedium}>
|
|
|
|
inherits the font-size of the parent element.{' '}
|
2023-04-04 18:48:04 +02:00
|
|
|
<Icon {...args} size={IconSize.Inherit} />
|
2023-02-22 23:42:50 +01:00
|
|
|
</Text>
|
|
|
|
<Text variant={TextVariant.bodyMd}>
|
|
|
|
inherits the font-size of the parent element.{' '}
|
2023-04-04 18:48:04 +02:00
|
|
|
<Icon {...args} size={IconSize.Inherit} />
|
2023-02-22 23:42:50 +01:00
|
|
|
</Text>
|
|
|
|
<Text variant={TextVariant.bodySm}>
|
|
|
|
inherits the font-size of the parent element.{' '}
|
2023-04-04 18:48:04 +02:00
|
|
|
<Icon {...args} size={IconSize.Inherit} />
|
2023-02-22 23:42:50 +01:00
|
|
|
</Text>
|
|
|
|
<Text variant={TextVariant.bodyXs}>
|
|
|
|
inherits the font-size of the parent element.{' '}
|
2023-04-04 18:48:04 +02:00
|
|
|
<Icon {...args} size={IconSize.Inherit} />
|
2022-09-29 17:33:34 +02:00
|
|
|
</Text>
|
|
|
|
</>
|
2022-09-20 19:15:14 +02:00
|
|
|
);
|
2023-02-02 21:15:26 +01:00
|
|
|
SizeStory.storyName = 'Size';
|
2022-11-23 18:58:43 +01:00
|
|
|
|
2023-05-25 22:53:31 +02:00
|
|
|
export const ColorStory: StoryFn<typeof Icon> = (args) => (
|
|
|
|
<Box display={Display.Flex} alignItems={AlignItems.baseline}>
|
|
|
|
<Box padding={1} display={Display.Flex} alignItems={AlignItems.center}>
|
2023-02-02 21:15:26 +01:00
|
|
|
<Icon {...args} color={IconColor.inherit} />
|
2022-09-20 19:15:14 +02:00
|
|
|
</Box>
|
2023-05-25 22:53:31 +02:00
|
|
|
<Box padding={1} display={Display.Flex} alignItems={AlignItems.center}>
|
2023-02-02 21:15:26 +01:00
|
|
|
<Icon {...args} color={IconColor.iconDefault} />
|
2022-09-20 19:15:14 +02:00
|
|
|
</Box>
|
2023-05-25 22:53:31 +02:00
|
|
|
<Box padding={1} display={Display.Flex} alignItems={AlignItems.center}>
|
2023-02-02 21:15:26 +01:00
|
|
|
<Icon {...args} color={IconColor.iconAlternative} />
|
2022-09-20 19:15:14 +02:00
|
|
|
</Box>
|
2023-05-25 22:53:31 +02:00
|
|
|
<Box padding={1} display={Display.Flex} alignItems={AlignItems.center}>
|
2023-02-02 21:15:26 +01:00
|
|
|
<Icon {...args} color={IconColor.iconMuted} />
|
2022-09-20 19:15:14 +02:00
|
|
|
</Box>
|
|
|
|
<Box
|
|
|
|
padding={1}
|
2023-05-25 22:53:31 +02:00
|
|
|
display={Display.Flex}
|
2023-02-02 21:15:26 +01:00
|
|
|
alignItems={AlignItems.center}
|
|
|
|
backgroundColor={BackgroundColor.overlayDefault}
|
2022-09-20 19:15:14 +02:00
|
|
|
>
|
2023-02-02 21:15:26 +01:00
|
|
|
<Icon {...args} color={IconColor.overlayInverse} />
|
2022-09-20 19:15:14 +02:00
|
|
|
</Box>
|
2023-05-25 22:53:31 +02:00
|
|
|
<Box padding={1} display={Display.Flex} alignItems={AlignItems.center}>
|
2023-02-02 21:15:26 +01:00
|
|
|
<Icon {...args} color={IconColor.primaryDefault} />
|
2022-09-20 19:15:14 +02:00
|
|
|
</Box>
|
|
|
|
<Box
|
|
|
|
padding={1}
|
2023-05-25 22:53:31 +02:00
|
|
|
display={Display.Flex}
|
2023-02-02 21:15:26 +01:00
|
|
|
alignItems={AlignItems.center}
|
|
|
|
backgroundColor={BackgroundColor.primaryDefault}
|
2022-09-20 19:15:14 +02:00
|
|
|
>
|
2023-02-02 21:15:26 +01:00
|
|
|
<Icon {...args} color={IconColor.primaryInverse} />
|
2022-09-20 19:15:14 +02:00
|
|
|
</Box>
|
2023-05-25 22:53:31 +02:00
|
|
|
<Box padding={1} display={Display.Flex} alignItems={AlignItems.center}>
|
2023-02-02 21:15:26 +01:00
|
|
|
<Icon {...args} color={IconColor.errorDefault} />
|
2022-09-20 19:15:14 +02:00
|
|
|
</Box>
|
|
|
|
<Box
|
|
|
|
padding={1}
|
2023-05-25 22:53:31 +02:00
|
|
|
display={Display.Flex}
|
2023-02-02 21:15:26 +01:00
|
|
|
alignItems={AlignItems.center}
|
|
|
|
backgroundColor={BackgroundColor.errorDefault}
|
2022-09-20 19:15:14 +02:00
|
|
|
>
|
2023-02-02 21:15:26 +01:00
|
|
|
<Icon {...args} color={IconColor.errorInverse} />
|
2022-09-20 19:15:14 +02:00
|
|
|
</Box>
|
2023-05-25 22:53:31 +02:00
|
|
|
<Box padding={1} display={Display.Flex} alignItems={AlignItems.center}>
|
2023-02-02 21:15:26 +01:00
|
|
|
<Icon {...args} color={IconColor.successDefault} />
|
2022-09-20 19:15:14 +02:00
|
|
|
</Box>
|
|
|
|
<Box
|
|
|
|
padding={1}
|
2023-05-25 22:53:31 +02:00
|
|
|
display={Display.Flex}
|
2023-02-02 21:15:26 +01:00
|
|
|
alignItems={AlignItems.center}
|
|
|
|
backgroundColor={BackgroundColor.successDefault}
|
2022-09-20 19:15:14 +02:00
|
|
|
>
|
2023-02-02 21:15:26 +01:00
|
|
|
<Icon {...args} color={IconColor.successInverse} />
|
2022-09-20 19:15:14 +02:00
|
|
|
</Box>
|
2023-05-25 22:53:31 +02:00
|
|
|
<Box padding={1} display={Display.Flex} alignItems={AlignItems.center}>
|
2023-02-02 21:15:26 +01:00
|
|
|
<Icon {...args} color={IconColor.warningDefault} />
|
2022-09-20 19:15:14 +02:00
|
|
|
</Box>
|
|
|
|
<Box
|
|
|
|
padding={1}
|
2023-05-25 22:53:31 +02:00
|
|
|
display={Display.Flex}
|
2023-02-02 21:15:26 +01:00
|
|
|
alignItems={AlignItems.center}
|
|
|
|
backgroundColor={BackgroundColor.warningDefault}
|
2022-09-20 19:15:14 +02:00
|
|
|
>
|
2023-02-02 21:15:26 +01:00
|
|
|
<Icon {...args} color={IconColor.warningInverse} />
|
2022-09-20 19:15:14 +02:00
|
|
|
</Box>
|
2023-05-25 22:53:31 +02:00
|
|
|
<Box padding={1} display={Display.Flex} alignItems={AlignItems.center}>
|
2023-02-02 21:15:26 +01:00
|
|
|
<Icon {...args} color={IconColor.infoDefault} />
|
2022-09-20 19:15:14 +02:00
|
|
|
</Box>
|
|
|
|
<Box
|
|
|
|
padding={1}
|
2023-05-25 22:53:31 +02:00
|
|
|
display={Display.Flex}
|
2023-02-02 21:15:26 +01:00
|
|
|
alignItems={AlignItems.center}
|
|
|
|
backgroundColor={BackgroundColor.infoDefault}
|
2022-09-20 19:15:14 +02:00
|
|
|
>
|
2023-02-02 21:15:26 +01:00
|
|
|
<Icon {...args} color={IconColor.infoInverse} />
|
2022-09-20 19:15:14 +02:00
|
|
|
</Box>
|
|
|
|
</Box>
|
|
|
|
);
|
2023-02-02 21:15:26 +01:00
|
|
|
ColorStory.storyName = 'Color';
|
2023-02-07 19:07:50 +01:00
|
|
|
|
|
|
|
export const LayoutAndSpacing = () => (
|
2023-05-25 22:53:31 +02:00
|
|
|
<Box display={Display.Flex} flexDirection={FlexDirection.Column} gap={4}>
|
|
|
|
<Box display={Display.Flex} alignItems={AlignItems.center}>
|
2023-02-07 19:07:50 +01:00
|
|
|
<Icon
|
2023-04-04 18:48:04 +02:00
|
|
|
name={IconName.Check}
|
2023-02-07 19:07:50 +01:00
|
|
|
color={IconColor.successDefault}
|
|
|
|
marginRight={1}
|
|
|
|
/>
|
|
|
|
<Text>Always allow you to opt-out via Settings</Text>
|
|
|
|
</Box>
|
|
|
|
<Box
|
|
|
|
as="button"
|
2023-05-25 22:53:31 +02:00
|
|
|
display={Display.Flex}
|
2023-02-07 19:07:50 +01:00
|
|
|
alignItems={AlignItems.center}
|
|
|
|
borderRadius={BorderRadius.pill}
|
|
|
|
backgroundColor={BackgroundColor.primaryMuted}
|
|
|
|
marginRight="auto"
|
|
|
|
>
|
|
|
|
<Text color={Color.primaryDefault}>
|
|
|
|
0x79fAaFe7B6D5DB5D8c63FE88DFF0AF1Fe53358db
|
|
|
|
</Text>
|
|
|
|
<Icon
|
2023-04-04 18:48:04 +02:00
|
|
|
name={IconName.Copy}
|
2023-02-07 19:07:50 +01:00
|
|
|
color={IconColor.primaryDefault}
|
|
|
|
marginLeft={1}
|
|
|
|
/>
|
|
|
|
</Box>
|
|
|
|
<Box
|
|
|
|
as="button"
|
2023-05-25 22:53:31 +02:00
|
|
|
display={Display.Flex}
|
2023-02-07 19:07:50 +01:00
|
|
|
alignItems={AlignItems.center}
|
|
|
|
padding={4}
|
|
|
|
borderColor={BorderColor.borderMuted}
|
|
|
|
backgroundColor={BackgroundColor.backgroundDefault}
|
|
|
|
>
|
2023-04-04 18:48:04 +02:00
|
|
|
<Icon name={IconName.Add} color={IconColor.iconDefault} marginRight={2} />
|
2023-02-07 19:07:50 +01:00
|
|
|
<Text>Create account</Text>
|
|
|
|
</Box>
|
2023-02-22 23:42:50 +01:00
|
|
|
<Label>
|
|
|
|
Custom spending cap{' '}
|
2023-04-04 18:48:04 +02:00
|
|
|
<Icon name={IconName.Info} size={IconSize.Inherit} marginLeft={1} />
|
2023-02-22 23:42:50 +01:00
|
|
|
</Label>
|
|
|
|
<div>
|
|
|
|
<Text>
|
|
|
|
<Icon
|
2023-04-04 18:48:04 +02:00
|
|
|
name={IconName.Warning}
|
|
|
|
size={IconSize.Inherit}
|
2023-02-22 23:42:50 +01:00
|
|
|
marginLeft={1}
|
|
|
|
color={IconColor.warningDefault}
|
|
|
|
/>{' '}
|
|
|
|
Warning
|
|
|
|
</Text>
|
|
|
|
</div>
|
2023-02-07 19:07:50 +01:00
|
|
|
</Box>
|
|
|
|
);
|