@@ -540,7 +540,7 @@ Demonstrates a common UI pattern known as keyboard handling or keyboard scrollin
540540 const handleClose = () => setShowActionsheet(false);
541541 return (
542542 <>
543- <Button onPress={handleClose }>
543+ <Button onPress={() => setShowActionsheet(true) }>
544544 <ButtonText>Open</ButtonText>
545545 </Button>
546546 <KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'padding' : undefined}>
@@ -642,7 +642,7 @@ Demonstrates a common UI pattern known as keyboard handling or keyboard scrollin
642642 const handleClose = () => setShowActionsheet(false);
643643 return (
644644 <>
645- <Button onPress={handleClose }>
645+ <Button onPress={() => setShowActionsheet(true) }>
646646 <ButtonText>Open</ButtonText>
647647 </Button>
648648 <Actionsheet
@@ -754,7 +754,7 @@ The Actionsheet with Icons is a variation of the Actionsheet component that disp
754754 const handleClose = () => setShowActionsheet(false);
755755 return (
756756 <>
757- <Button onPress={handleClose }>
757+ <Button onPress={() => setShowActionsheet(true) }>
758758 <ButtonText>Open</ButtonText>
759759 </Button>
760760 <Actionsheet isOpen={showActionsheet} onClose={handleClose}>
@@ -843,7 +843,7 @@ The Actionsheet with Virtualized List includes a virtualized list for better per
843843 );
844844 return (
845845 <>
846- <Button onPress={handleClose }>
846+ <Button onPress={() => setShowActionsheet(true) }>
847847 <ButtonText>Open</ButtonText>
848848 </Button>
849849 <Actionsheet isOpen={showActionsheet} onClose={handleClose} snapPoints={[50]}>
@@ -924,7 +924,7 @@ The Actionsheet with Flat List is a variation of the Actionsheet component that
924924 );
925925 return (
926926 <>
927- <Button onPress={handleClose }>
927+ <Button onPress={() => setShowActionsheet(true) }>
928928 <ButtonText>Open</ButtonText>
929929 </Button>
930930 <Actionsheet isOpen={showActionsheet} onClose={handleClose}>
@@ -985,7 +985,7 @@ The Actionsheet with SectionList is a variation of the Actionsheet component tha
985985 ];
986986 return (
987987 <>
988- <Button onPress={handleClose }>
988+ <Button onPress={() => setShowActionsheet(true) }>
989989 <ButtonText>Open</ButtonText>
990990 </Button>
991991 <Actionsheet isOpen={showActionsheet} onClose={handleClose} snapPoints={[35]}>
@@ -1050,7 +1050,7 @@ The Actionsheet with SectionList is a variation of the Actionsheet component tha
10501050 const handleClose = () => setShowActionsheet(false);
10511051 return (
10521052 <>
1053- <Button onPress={handleClose }>
1053+ <Button onPress={() => setShowActionsheet(true) }>
10541054 <ButtonText>Open</ButtonText>
10551055 </Button>
10561056 <Actionsheet isOpen={showActionsheet} onClose={handleClose}>
@@ -1126,126 +1126,4 @@ The Actionsheet with SectionList is a variation of the Actionsheet component tha
11261126 argsType: {},
11271127 }}
11281128 />
1129- </Wrapper >
1130-
1131- { /* ### Actionsheet with CTA
1132-
1133- <Wrapper>
1134- <CodePreview
1135- showComponentRenderer={true}
1136- showArgsController={false}
1137- metaData={{
1138- code: `
1139- function App(){
1140- const [showActionsheet, setShowActionsheet] = React.useState(false);
1141- const handleClose = () => setShowActionsheet(false);
1142- return (
1143- <>
1144- <Button onPress={handleClose}>
1145- <ButtonText>Open</ButtonText>
1146- </Button>
1147- <Actionsheet isOpen={showActionsheet} onClose={handleClose}>
1148- <ActionsheetBackdrop />
1149- <ActionsheetContent className="px-5">
1150- <ActionsheetDragIndicatorWrapper>
1151- <ActionsheetDragIndicator />
1152- </ActionsheetDragIndicatorWrapper>
1153- <HStack className="justify-between w-full gap-2 mt-3">
1154- <Text
1155- size="xl"
1156- className="font-semibold text-typography-900 flex-1"
1157- >
1158- See what all new features are available in this updated
1159- </Text>
1160- <Pressable onPress={handleClose}>
1161- <Icon as={CloseIcon} size="lg" className="stroke-background-500" />
1162- </Pressable>
1163- </HStack>
1164- <VStack className="my-5 gap-3 w-full">
1165- <ActionsheetItem className="gap-3 w-full" onPress={handleClose}>
1166- <Box className="bg-success-700 rounded-full items-center justify-center w-8 h-8">
1167- <ActionsheetIcon size="sm" as={Send} className="stroke-typography-0" />
1168- </Box>
1169- <VStack className="flex-1">
1170- <Text className="text-typography-950">
1171- Simplified navigation
1172- </Text>
1173- <ActionsheetItemText size="sm">
1174- Usage of app was never that easy: all important things at your
1175- fingertips
1176- </ActionsheetItemText>
1177- </VStack>
1178- </ActionsheetItem>
1179- <ActionsheetItem className="gap-3" onPress={handleClose}>
1180- <Box className="w-8 h-8 bg-success-700 rounded-full items-center justify-center">
1181- <ActionsheetIcon
1182- size="sm"
1183- as={Percent}
1184- className="stroke-typography-0"
1185- />
1186- </Box>
1187- <VStack className="flex-1">
1188- <Text className="text-typography-950">Special offer</Text>
1189- <ActionsheetItemText size="sm">
1190- Get new offers and discounts every week right in the app
1191- </ActionsheetItemText>
1192- </VStack>
1193- </ActionsheetItem>
1194- <ActionsheetItem className="gap-3" onPress={handleClose}>
1195- <Box className="w-8 h-8 bg-success-700 rounded-full items-center justify-center">
1196- <ActionsheetIcon
1197- size="sm"
1198- as={DollarSign}
1199- className="stroke-typography-0"
1200- />
1201- </Box>
1202- <VStack className="flex-1">
1203- <Text className="text-typography-950">New cashback</Text>
1204- <ActionsheetItemText size="sm">
1205- Get daily cashback from every purchase you make and even more
1206- when you shop at our partners
1207- </ActionsheetItemText>
1208- </VStack>
1209- </ActionsheetItem>
1210- </VStack>
1211- <Button className="w-full" size="lg" onPress={handleClose}>
1212- <ButtonText>Explore all</ButtonText>
1213- </Button>
1214- </ActionsheetContent>
1215- </Actionsheet>
1216- </>
1217- );
1218- }
1219- `,
1220- transformCode: (code) => {
1221- return transformedCode(code, 'function', 'App');
1222- },
1223- scope: {
1224- Actionsheet,
1225- ActionsheetBackdrop,
1226- ActionsheetContent,
1227- ActionsheetDragIndicator,
1228- ActionsheetDragIndicatorWrapper,
1229- ActionsheetItem,
1230- ActionsheetIcon,
1231- ActionsheetItemText,
1232- ActionsheetSectionList,
1233- ActionsheetSectionHeaderText,
1234- Button,
1235- ButtonText,
1236- Wrapper,
1237- HStack,
1238- VStack,
1239- Box,
1240- Text,
1241- Icon,
1242- CloseIcon,
1243- Send,
1244- Percent,
1245- DollarSign,
1246- Pressable
1247- },
1248- argsType: {},
1249- }}
1250- />
1251- </Wrapper> */ }
1129+ </Wrapper >
0 commit comments