From 020bc185d8db9ca90396952729a07fb3757cb616 Mon Sep 17 00:00:00 2001 From: ruchik02 Date: Wed, 30 Nov 2022 17:24:52 +0530 Subject: [PATCH 1/2] changes in metatitle and metadescription in nativebase factory --- docs/3.0.x/nativebase-factory.md | 36 +++++++++++++++++--------------- docs/3.1.x/nativebase-factory.md | 36 +++++++++++++++++--------------- docs/3.2.x/nativebase-factory.md | 4 +++- docs/3.3.x/nativebase-factory.md | 4 +++- docs/3.4.x/nativebase-factory.md | 2 ++ docs/next/nativebase-factory.md | 2 ++ layouts/index.tsx | 10 ++++----- 7 files changed, 52 insertions(+), 42 deletions(-) diff --git a/docs/3.0.x/nativebase-factory.md b/docs/3.0.x/nativebase-factory.md index 02c521dd3..96f5a9f33 100644 --- a/docs/3.0.x/nativebase-factory.md +++ b/docs/3.0.x/nativebase-factory.md @@ -1,20 +1,22 @@ --- id: nativebase-factory title: NativeBase Factory +metaTitle: NativeBase Factory | NativeBase +metaDescription: NativeBase factory is a function that converts Non-NativeBase components to NativeBase-enabled components so you can pass style props to them. --- NativeBase factory is a function that converts non-nativebase components to nativebase enabled components so you can pass style props to them. ```jsx -import { Factory } from 'native-base'; +import { Factory } from "native-base"; ``` ## Usage ```jsx isLive=true -import React from 'react'; -import { Factory, NativeBaseProvider, Center } from 'native-base'; -import { View } from 'react-native'; +import React from "react"; +import { Factory, NativeBaseProvider, Center } from "native-base"; +import { View } from "react-native"; function FactoryViewExample() { const FactoryView = Factory(View); @@ -36,15 +38,15 @@ export function Example() { ## Defining component theme ```jsx isLive=true -import React from 'react'; -import { Factory, NativeBaseProvider, Center } from 'native-base'; -import { View } from 'react-native'; +import React from "react"; +import { Factory, NativeBaseProvider, Center } from "native-base"; +import { View } from "react-native"; function FactoryViewExample() { const FactoryView = Factory(View, { baseStyle: { - bg: 'cyan.300', - borderRadius: 'md', + bg: "cyan.300", + borderRadius: "md", }, }); return ; @@ -65,16 +67,16 @@ export function Example() { ## Using mode in component theme ```jsx isLive=true -import React from 'react'; -import { Factory, themeTools, NativeBaseProvider, Center } from 'native-base'; -import { View } from 'react-native'; +import React from "react"; +import { Factory, themeTools, NativeBaseProvider, Center } from "native-base"; +import { View } from "react-native"; function FactoryViewModeExample() { const FactoryView = Factory(View, { baseStyle: (props) => { return { - bg: themeTools.mode('rose.500', 'cyan.300')(props), - borderRadius: 'md', + bg: themeTools.mode("rose.500", "cyan.300")(props), + borderRadius: "md", }; }, }); @@ -96,15 +98,15 @@ export function Example() { ## Using ref ```jsx isLive=true -import React from 'react'; +import React from "react"; import { Factory, Button, Stack, NativeBaseProvider, Center, -} from 'native-base'; -import { TextInput } from 'react-native'; +} from "native-base"; +import { TextInput } from "react-native"; function FactoryViewRefExample() { const NBInput = Factory(TextInput); diff --git a/docs/3.1.x/nativebase-factory.md b/docs/3.1.x/nativebase-factory.md index d7aff6d55..53631d70c 100644 --- a/docs/3.1.x/nativebase-factory.md +++ b/docs/3.1.x/nativebase-factory.md @@ -1,20 +1,22 @@ --- id: nativebase-factory title: NativeBase Factory +metaTitle: NativeBase Factory | NativeBase +metaDescription: NativeBase factory is a function that converts Non-NativeBase components to NativeBase-enabled components so you can pass style props to them. --- NativeBase factory is a function that converts non-nativebase components to nativebase enabled components so you can pass style props to them. ```jsx -import { Factory } from 'native-base'; +import { Factory } from "native-base"; ``` ## Usage ```jsx isLive=true -import React from 'react'; -import { Factory, NativeBaseProvider, Center } from 'native-base'; -import { View } from 'react-native'; +import React from "react"; +import { Factory, NativeBaseProvider, Center } from "native-base"; +import { View } from "react-native"; function FactoryViewExample() { const FactoryView = Factory(View); @@ -36,15 +38,15 @@ export function Example() { ## Defining component theme ```jsx isLive=true -import React from 'react'; -import { Factory, NativeBaseProvider, Center } from 'native-base'; -import { View } from 'react-native'; +import React from "react"; +import { Factory, NativeBaseProvider, Center } from "native-base"; +import { View } from "react-native"; function FactoryViewExample() { const FactoryView = Factory(View, { baseStyle: { - bg: 'cyan.300', - borderRadius: 'md', + bg: "cyan.300", + borderRadius: "md", }, }); return ; @@ -65,16 +67,16 @@ export function Example() { ## Using mode in component theme ```jsx isLive=true -import React from 'react'; -import { Factory, themeTools, NativeBaseProvider, Center } from 'native-base'; -import { View } from 'react-native'; +import React from "react"; +import { Factory, themeTools, NativeBaseProvider, Center } from "native-base"; +import { View } from "react-native"; function FactoryViewModeExample() { const FactoryView = Factory(View, { baseStyle: (props) => { return { - bg: themeTools.mode('rose.500', 'cyan.300')(props), - borderRadius: 'md', + bg: themeTools.mode("rose.500", "cyan.300")(props), + borderRadius: "md", }; }, }); @@ -96,15 +98,15 @@ export function Example() { ## Using ref ```jsx isLive=true -import React from 'react'; +import React from "react"; import { Factory, Button, Stack, NativeBaseProvider, Center, -} from 'native-base'; -import { TextInput } from 'react-native'; +} from "native-base"; +import { TextInput } from "react-native"; function FactoryViewRefExample() { const NBInput = Factory(TextInput); diff --git a/docs/3.2.x/nativebase-factory.md b/docs/3.2.x/nativebase-factory.md index 1b839814e..88c4ce9a6 100644 --- a/docs/3.2.x/nativebase-factory.md +++ b/docs/3.2.x/nativebase-factory.md @@ -1,12 +1,14 @@ --- id: nativebase-factory title: NativeBase Factory +metaTitle: NativeBase Factory | NativeBase +metaDescription: NativeBase factory is a function that converts Non-NativeBase components to NativeBase-enabled components so you can pass style props to them. --- NativeBase factory is a function that converts non-nativebase components to nativebase enabled components so you can pass style props to them. ```jsx -import { Factory } from 'native-base'; +import { Factory } from "native-base"; ``` ## Usage diff --git a/docs/3.3.x/nativebase-factory.md b/docs/3.3.x/nativebase-factory.md index 1b839814e..88c4ce9a6 100644 --- a/docs/3.3.x/nativebase-factory.md +++ b/docs/3.3.x/nativebase-factory.md @@ -1,12 +1,14 @@ --- id: nativebase-factory title: NativeBase Factory +metaTitle: NativeBase Factory | NativeBase +metaDescription: NativeBase factory is a function that converts Non-NativeBase components to NativeBase-enabled components so you can pass style props to them. --- NativeBase factory is a function that converts non-nativebase components to nativebase enabled components so you can pass style props to them. ```jsx -import { Factory } from 'native-base'; +import { Factory } from "native-base"; ``` ## Usage diff --git a/docs/3.4.x/nativebase-factory.md b/docs/3.4.x/nativebase-factory.md index 7bbf60990..757306cf4 100644 --- a/docs/3.4.x/nativebase-factory.md +++ b/docs/3.4.x/nativebase-factory.md @@ -1,6 +1,8 @@ --- id: nativebase-factory title: NativeBase Factory +metaTitle: NativeBase Factory | NativeBase +metaDescription: NativeBase factory is a function that converts Non-NativeBase components to NativeBase-enabled components so you can pass style props to them. --- NativeBase factory is a function that converts Non-NativeBase components to NativeBase enabled components so you can pass style props to them. diff --git a/docs/next/nativebase-factory.md b/docs/next/nativebase-factory.md index 7bbf60990..757306cf4 100644 --- a/docs/next/nativebase-factory.md +++ b/docs/next/nativebase-factory.md @@ -1,6 +1,8 @@ --- id: nativebase-factory title: NativeBase Factory +metaTitle: NativeBase Factory | NativeBase +metaDescription: NativeBase factory is a function that converts Non-NativeBase components to NativeBase-enabled components so you can pass style props to them. --- NativeBase factory is a function that converts Non-NativeBase components to NativeBase enabled components so you can pass style props to them. diff --git a/layouts/index.tsx b/layouts/index.tsx index 2b3690447..c55acab2f 100644 --- a/layouts/index.tsx +++ b/layouts/index.tsx @@ -103,7 +103,8 @@ function Layout({ ? frontMatter.title + " | NativeBase " : pages?.currentPage?.title + " | NativeBase " }`; - + const { metaTitle, metaDescription } = frontMatter; + console.log(metaTitle, metaDescription); let href = "https://docs.nativebase.io/" + pages.currentPage.id; return ( @@ -115,11 +116,8 @@ function Layout({ content="Universal Components for React and React Native" /> {/* og meta links */} - - + + From 43b0ee469493a163cad57bbeed130ea36402de11 Mon Sep 17 00:00:00 2001 From: ruchik02 Date: Mon, 5 Dec 2022 13:09:55 +0530 Subject: [PATCH 2/2] remove console in index.tsx file --- layouts/index.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/layouts/index.tsx b/layouts/index.tsx index f146ee837..76bede74b 100644 --- a/layouts/index.tsx +++ b/layouts/index.tsx @@ -103,11 +103,8 @@ function Layout({ ? frontMatter.title + " | NativeBase " : pages?.currentPage?.title + " | NativeBase " }`; - const { metaTitle, metaDescription } = frontMatter; - console.log(metaTitle, metaDescription); let href = "https://docs.nativebase.io/" + pages.currentPage.id; const { metaTitle, metaDescription } = frontMatter; - console.log(metaTitle, metaDescription); return ( <>