-
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 #4566 from GeekyAnts/release/3.3.4-rc.0
release 3.3.4-rc.0
- Loading branch information
Showing
26 changed files
with
352 additions
and
350 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
65 changes: 13 additions & 52 deletions
65
example/storybook/stories/components/composites/Transitions/Slide.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 |
---|---|---|
@@ -1,65 +1,26 @@ | ||
import React from 'react'; | ||
import { | ||
Slide, | ||
Button, | ||
Alert, | ||
VStack, | ||
Heading, | ||
Divider, | ||
Center, | ||
Text, | ||
} from 'native-base'; | ||
import { Slide, Button, Alert, Text, Box } from 'native-base'; | ||
export const Example = () => { | ||
const [isOpenBottom, setIsOpenBottom] = React.useState(false); | ||
const [isOpenTop, setIsOpenTop] = React.useState(false); | ||
|
||
const str1 = `${isOpenTop ? 'Hide' : 'Show'}`; | ||
const str2 = `${isOpenBottom ? 'Hide' : 'Show'}`; | ||
const str = `${isOpenTop ? 'Hide' : 'Check Internet Connection'}`; | ||
return ( | ||
<> | ||
<Slide in={isOpenBottom} placement="bottom"> | ||
<Alert justifyContent="center" mx="4" mt="auto" mb="4" status="success"> | ||
<Alert.Icon /> | ||
<Text | ||
// _light={{ color: 'success.600' }} | ||
// _dark={{ color: 'success.100' }} | ||
color="success.600" | ||
fontWeight="medium" | ||
> | ||
Order placed successfully! | ||
</Text> | ||
</Alert> | ||
</Slide> | ||
<Box h="32" w="300"> | ||
<Slide in={isOpenTop} placement="top"> | ||
<Alert justifyContent="center" mx="4" mt="4" status="error"> | ||
<Alert justifyContent="center" status="error"> | ||
<Alert.Icon /> | ||
|
||
<Text color="error.600" fontWeight="medium"> | ||
No Internet Connection | ||
</Text> | ||
</Alert> | ||
</Slide> | ||
|
||
<VStack space={2.5} w={{ base: '50%', md: '25%' }} alignItems="center"> | ||
<Center w="100%"> | ||
<Heading textAlign="center" size="md" mb={4}> | ||
Top | ||
</Heading> | ||
<Button w="100" onPress={() => setIsOpenTop(!isOpenTop)} mb={5}> | ||
{str1} | ||
</Button> | ||
<Divider /> | ||
</Center> | ||
<Center w="100%"> | ||
<Heading textAlign="center" size="md" mb={4}> | ||
Bottom | ||
</Heading> | ||
<Button w="100" onPress={() => setIsOpenBottom(!isOpenBottom)}> | ||
{str2} | ||
{/* Click Me to {isOpenBottom ? "hide" : "show"} Bottom Slider */} | ||
</Button> | ||
</Center> | ||
</VStack> | ||
</> | ||
<Button | ||
mt="auto" | ||
onPress={() => setIsOpenTop(!isOpenTop)} | ||
variant="unstyled" | ||
bg="coolGray.700:alpha.30" | ||
> | ||
{str} | ||
</Button> | ||
</Box> | ||
); | ||
}; |
Oops, something went wrong.
ab057ac
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: