-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4851 from GeekyAnts/release/3.4.0-rc.0
Release/3.4.0 rc.0
- Loading branch information
Showing
260 changed files
with
8,738 additions
and
2,092 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
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
19 changes: 19 additions & 0 deletions
19
example/storybook/stories/components/composites/Badge/icons.tsx
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,19 @@ | ||
import React from 'react'; | ||
import { Badge, Stack, AddIcon } from 'native-base'; | ||
|
||
export const Example = () => { | ||
return ( | ||
<Stack direction={{ base: 'column', md: 'row' }} space={4}> | ||
<Badge colorScheme="success" endIcon={<AddIcon size="2xs" />}> | ||
SUCCESS | ||
</Badge> | ||
<Badge | ||
colorScheme="warning" | ||
variant="outline" | ||
startIcon={<AddIcon size="2xs" />} | ||
> | ||
SUCCESS | ||
</Badge> | ||
</Stack> | ||
); | ||
}; |
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
22 changes: 10 additions & 12 deletions
22
example/storybook/stories/components/composites/IconButton/Sizes.tsx
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
111 changes: 111 additions & 0 deletions
111
example/storybook/stories/components/composites/Toast/StatusRecipies.tsx
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,111 @@ | ||
import React from 'react'; | ||
import { | ||
Button, | ||
useToast, | ||
VStack, | ||
HStack, | ||
Text, | ||
Center, | ||
IconButton, | ||
CloseIcon, | ||
Alert, | ||
} from 'native-base'; | ||
|
||
export const Example = () => { | ||
const toast = useToast(); | ||
const ToastDetails = [ | ||
{ | ||
title: 'Account verified', | ||
status: 'success', | ||
description: 'Thanks for signing up with us.', | ||
isClosable: true, | ||
}, | ||
{ | ||
title: 'Something went wrong', | ||
status: 'error', | ||
description: 'Please create a support ticket from the support page', | ||
}, | ||
{ | ||
title: 'Network connection restored', | ||
status: 'info', | ||
description: | ||
'This is to inform you that your network connectivity is restored', | ||
isClosable: true, | ||
}, | ||
{ | ||
title: 'Invalid email address', | ||
status: 'warning', | ||
description: 'Please enter a valid email address', | ||
}, | ||
]; | ||
|
||
const ToastAlert = ({ | ||
id, | ||
status, | ||
variant, | ||
title, | ||
description, | ||
isClosable, | ||
...rest | ||
}: any) => ( | ||
<Alert | ||
maxWidth="100%" | ||
alignSelf="center" | ||
flexDirection="row" | ||
status={status ?? 'info'} | ||
variant={variant as any} | ||
{...rest} | ||
> | ||
<VStack space={1} flexShrink={1} w="100%"> | ||
<HStack | ||
flexShrink={1} | ||
alignItems="center" | ||
justifyContent="space-between" | ||
> | ||
<HStack space={2} flexShrink={1} alignItems="center"> | ||
<Alert.Icon /> | ||
<Text | ||
fontSize="md" | ||
fontWeight="medium" | ||
flexShrink={1} | ||
color="darkText" | ||
> | ||
{title} | ||
</Text> | ||
</HStack> | ||
{isClosable ? ( | ||
<IconButton | ||
variant="unstyled" | ||
icon={<CloseIcon size="3" />} | ||
onPress={() => toast.close(id)} | ||
/> | ||
) : null} | ||
</HStack> | ||
<Text px="6" color="darkText"> | ||
{description} | ||
</Text> | ||
</VStack> | ||
</Alert> | ||
); | ||
|
||
return ( | ||
<Center> | ||
<VStack space={2}> | ||
{ToastDetails.map((item) => ( | ||
<Button | ||
colorScheme={item.status} | ||
onPress={() => | ||
toast.show({ | ||
render: ({ id }) => { | ||
return <ToastAlert id={id} {...item} />; | ||
}, | ||
}) | ||
} | ||
> | ||
{item.status} | ||
</Button> | ||
))} | ||
</VStack> | ||
</Center> | ||
); | ||
}; |
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.