import React from "react"; import { ScrollView } from "react-native"; import { Heading, VStack, Box, useColorMode, useColorModeValue, Divider, Flex, } from "native-base"; import { mapping } from "../../config/map"; import { StackNavigationProp } from "@react-navigation/stack"; import { Layout } from "../../components/Layout"; export function Examples({ route, navigation, }: { route: any; navigation: StackNavigationProp; }) { let name: string = route.params.name; //@ts-ignore const component = mapping[name]; const { colorMode, toggleColorMode } = useColorMode(); return ( {component.components.map((element: any, index: number) => ( {element.title} {element.title === "Slide Fade" ? ( ) : ( <> )} ))} ); }