-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update sequence.js to 1.9.19 * Throw errors instead of returning * Update example to show and alert about wallet balance for fees * Update insufficient fee alert * version 2.1.1
- Loading branch information
1 parent
62fc524
commit 3c9bd85
Showing
12 changed files
with
503 additions
and
272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import { Box, Button, Text } from '@0xsequence/design-system' | ||
import { ComponentProps } from 'react' | ||
|
||
export type AlertProps = { | ||
title: string | ||
description: string | ||
secondaryDescription?: string | ||
variant: 'negative' | 'warning' | 'positive' | ||
buttonProps?: ComponentProps<typeof Button> | ||
children?: React.ReactNode | ||
} | ||
|
||
export const Alert = ({ title, description, secondaryDescription, variant, buttonProps, children }: AlertProps) => { | ||
return ( | ||
<Box borderRadius="md" background={variant}> | ||
<Box | ||
background="backgroundOverlay" | ||
borderRadius="md" | ||
paddingX={{ sm: '4', md: '5' }} | ||
paddingY="4" | ||
width="full" | ||
flexDirection="column" | ||
gap="3" | ||
> | ||
<Box width="full" flexDirection={{ sm: 'column', md: 'row' }} gap="2" justifyContent="space-between"> | ||
<Box flexDirection="column" gap="1"> | ||
<Text variant="normal" color="text100" fontWeight="medium"> | ||
{title} | ||
</Text> | ||
|
||
<Text variant="normal" color="text50" fontWeight="medium"> | ||
{description} | ||
</Text> | ||
|
||
{secondaryDescription && ( | ||
<Text variant="normal" color="text80" fontWeight="medium"> | ||
{secondaryDescription} | ||
</Text> | ||
)} | ||
</Box> | ||
|
||
{buttonProps ? ( | ||
<Box background={variant} borderRadius="sm" width={'min'} height={'min'}> | ||
<Button variant="emphasis" shape="square" flexShrink="0" {...buttonProps} /> | ||
</Box> | ||
) : null} | ||
</Box> | ||
|
||
{children} | ||
</Box> | ||
</Box> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.