import { useLayoutEffect, useState } from "react"; import { View } from "react-native"; import stylesheet from "./stylesheet"; import { NCoreUIKitLocalize, NCoreUIKitTheme, PageContainer, CodeViewer, TextInput, Header, Switch, Text } from "ncore-ui-kit"; import { useNavigation } from "@react-navigation/native"; import type RootStackParamList from "../../../navigation/type"; import type { NativeStackNavigationProp } from "@react-navigation/native-stack"; const HeaderPage = () => { const { radiuses, borders, spaces, colors } = NCoreUIKitTheme.useContext(); const { localize } = NCoreUIKitLocalize.useContext(); const navigation = useNavigation>(); const [ title, setTitle ] = useState("Header Example"); const [ isGoBackEnable, setIsGoBackEnable ] = useState(true); useLayoutEffect(() => { navigation.setOptions({ header: () =>
, headerShown: true }); }, []); return {localize("header-desc")}
{localize("usage")} "} language="tsx" /> setIsGoBackEnable(!isGoBackEnable)} title={localize("header-toggleGoBack")} isActive={isGoBackEnable} spreadBehaviour="free" /> ; }; export default HeaderPage;