| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- import {
- useLayoutEffect
- } from "react";
- import {
- View
- } from "react-native";
- import {
- NCoreUIKitLocalize,
- NCoreUIKitTheme,
- PageContainer,
- CodeViewer,
- Button,
- Header,
- 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";
- import {
- ChevronRightIcon
- } from "lucide-react-native";
- const Installation = () => {
- const {
- colors,
- spaces
- } = NCoreUIKitTheme.useContext();
- const {
- localize
- } = NCoreUIKitLocalize.useContext();
- const navigation = useNavigation<NativeStackNavigationProp<RootStackParamList>>();
- useLayoutEffect(() => {
- navigation.setOptions({
- header: () => (
- <Header
- title={localize("installation-title")}
- isWrapSafeareaContext={false}
- navigation={navigation}
- isGoBackEnable={true}
- />
- ),
- headerShown: true
- });
- }, []);
- return (
- <PageContainer
- isWorkWithHeaderSpace={false}
- isScrollable={true}
- >
- <View
- style={{
- padding: spaces.spacingMd,
- width: "100%"
- }}
- >
- <Text
- variant="bodyMediumSize"
- color="mid"
- style={{
- marginBottom: spaces.spacingMd
- }}
- >
- {localize("installation-desc")}
- </Text>
- <View
- style={{
- backgroundColor: colors.content.container.default,
- borderColor: colors.content.border.subtle,
- borderRadius: 10,
- borderWidth: 1,
- padding: spaces.spacingMd,
- marginBottom: spaces.spacingMd
- }}
- >
- <Text variant="headlineSmallSize">{localize("installation-installationTitle")}</Text>
- <CodeViewer
- code={"yarn add ncore-ui-kit"}
- language="bash"
- />
- </View>
- <View
- style={{
- backgroundColor: colors.content.container.default,
- borderColor: colors.content.border.subtle,
- borderRadius: 10,
- borderWidth: 1,
- padding: spaces.spacingMd,
- marginBottom: spaces.spacingMd
- }}
- >
- <Text variant="headlineSmallSize">{localize("installation-peerDepsTitle")}</Text>
- <Text
- variant="bodyMediumSize"
- color="mid"
- style={{
- marginBottom: 10,
- marginTop: 10
- }}
- >
- {localize("installation-peerDepsDesc")}
- </Text>
- <CodeViewer
- code="yarn add @react-native-clipboard/clipboard lucide-react-native moment ncore-context react-native-safe-area-context react-native-svg rrule"
- language="bash"
- />
- </View>
- <View
- style={{
- flexDirection: "row",
- justifyContent: "flex-end",
- marginTop: spaces.spacingMd
- }}
- >
- <Button
- icon={({
- color,
- size
- }) => {
- return <ChevronRightIcon
- color={colors.content.icon[color]}
- size={size + 3}
- />;
- }}
- title={localize("next")}
- iconDirection="right"
- onPress={() => {
- navigation.navigate("GettingStarted", {
- screen: "Implementation"
- });
- }}
- />
- </View>
- </View>
- </PageContainer>
- );
- };
- export default Installation;
|