Copyimport { useColorMode } from "native-base";
Playgroundfunction UseColorMode() {const {colorMode,toggleColorMode} = useColorMode();return <Center flex={1} bg={colorMode === "dark" ? "black" : "white"}><Text fontSize="lg" display="flex">The active color mode is <Text bold>{colorMode}</Text></Text><Button m={2} onPress={toggleColorMode}>Toggle</Button></Center>;}function Example() {return <NativeBaseProvider><UseColorMode /></NativeBaseProvider>;}