From 58dba75b449e540d02df7c7492489320a4f6050d Mon Sep 17 00:00:00 2001 From: madhav23bansal Date: Thu, 9 Sep 2021 18:29:53 +0530 Subject: [PATCH 1/2] Changes to snackplayer and code strict mode --- docs/alertDialog.md | 6 +- docs/appDrawer.md | 4 +- docs/box.md | 6 +- docs/buildingAppBar.md | 8 +-- docs/buildingDrawerNavigation.md | 66 +++++++++---------- docs/buildingFooterTabs.md | 38 +++++------ docs/buildingSearchBar.md | 28 ++++---- docs/buildingSwipeList.md | 24 +++---- docs/buildingTabView.md | 12 ++-- docs/builldingCard.md | 12 ++-- docs/container.md | 2 +- docs/customizingComponents.md | 4 +- docs/form.md | 14 ++-- docs/hidden.md | 16 ++--- docs/loginsignupforms.md | 20 +++--- docs/migration/Guide.md | 2 +- docs/nativebase-factory.md | 8 +-- docs/nativebase-formik-ui.md | 2 +- docs/overlay.md | 4 +- docs/pseudoProps.md | 2 +- docs/reactHooksForms.md | 26 ++++---- docs/responsive.md | 6 +- docs/setup-provider.md | 2 +- docs/textField.md | 6 +- docs/theme.md | 4 +- docs/todo-list.md | 14 ++-- docs/transition.md | 12 ++-- docs/useAccessibleColors.md | 6 +- docs/useBreakPointValue.md | 4 +- docs/useClipboard.md | 8 +-- docs/useColorMode.md | 4 +- docs/useColorModeValue.md | 4 +- docs/useContrastText.md | 8 +-- docs/useDisclosure.md | 6 +- docs/useMediaQuery.md | 10 +-- docs/usePopOver.md | 2 +- docs/useToken.md | 2 +- docs/utilityProps.md | 26 ++++---- .../storybook-example-transformer/index.js | 2 +- sidebars.js | 2 +- 40 files changed, 216 insertions(+), 216 deletions(-) diff --git a/docs/alertDialog.md b/docs/alertDialog.md index 17a9c2fdd..1d0d8e1a2 100644 --- a/docs/alertDialog.md +++ b/docs/alertDialog.md @@ -56,7 +56,7 @@ function AlertDialogComponent() { - @@ -71,7 +71,7 @@ function AlertDialogComponent() { export default function () { return ( -
+
@@ -122,7 +122,7 @@ function AlertDialogComponent() { export default function () { return ( -
+
diff --git a/docs/appDrawer.md b/docs/appDrawer.md index 6890a689e..7e0afecbd 100644 --- a/docs/appDrawer.md +++ b/docs/appDrawer.md @@ -34,13 +34,13 @@ function AppDrawer(){ "forum", ]; - return + return {icons.map((icon) => ( } /> ))} diff --git a/docs/box.md b/docs/box.md index 5c884c1ef..e22130f75 100644 --- a/docs/box.md +++ b/docs/box.md @@ -41,7 +41,7 @@ export const Example = () => { end: [1, 0], }, }} - p={12} + p="12" rounded="lg" _text={{ fontSize: "md", @@ -63,7 +63,7 @@ const config = { export default () => { return ( -
+
@@ -89,7 +89,7 @@ const Example = () => { end: [1, 0], }, }} - p={12} + p="12" rounded="lg" _text={{ fontSize: 'md', fontWeight: 'bold', color: 'white' }} > diff --git a/docs/buildingAppBar.md b/docs/buildingAppBar.md index 9f43bfcc8..463c93df3 100644 --- a/docs/buildingAppBar.md +++ b/docs/buildingAppBar.md @@ -21,12 +21,12 @@ function AppBar(){ - - + + } color="white" />} /> - Home + Home - + } size='sm' color="white" />} /> } color="white" size='sm' />} /> diff --git a/docs/buildingDrawerNavigation.md b/docs/buildingDrawerNavigation.md index 5ee14a952..4e59c8e32 100644 --- a/docs/buildingDrawerNavigation.md +++ b/docs/buildingDrawerNavigation.md @@ -36,11 +36,11 @@ import { const Drawer = createDrawerNavigator(); function Component(props) { return ( - - props.navigation.toggleDrawer()} position="absolute" ml={2} zIndex={1}> - + + props.navigation.toggleDrawer()} position="absolute" ml="2" zIndex="1"> + -
+
{props.route.name}
@@ -69,72 +69,72 @@ const getIcon = (screenName) => { function CustomDrawerContent(props) { return ( - - + + Mail - john_doe@gmail.com + john_doe@gmail.com - } space={4}> - + } space="4"> + {props.state.routeNames.map((name, index) => ( { props.navigation.navigate(name); }} > - + } /> - + size="5" as={} /> + {name} ))} - - Labels - + + Labels + - + } /> - + size="5" as={} /> + Family - + } /> - + size="5" as={} /> + Friends - + } /> - + size="5" as={} /> + Work @@ -148,7 +148,7 @@ function CustomDrawerContent(props) { } function MyDrawer() { return ( - + } > diff --git a/docs/buildingFooterTabs.md b/docs/buildingFooterTabs.md index f2d847ae0..b696cf4a0 100644 --- a/docs/buildingFooterTabs.md +++ b/docs/buildingFooterTabs.md @@ -31,79 +31,79 @@ export default function App() { const [selected, setSelected] = React.useState(1); return ( - -
+ +
- + setSelected(0)} >
} color="white" size="xs" /> - Favorites + Favorites
setSelected(1)} >
} color="white" size="xs" /> - Music + Music
setSelected(2)} >
} color="white" size="xs" /> - Places + Places
setSelected(3)} >
} color="white" size="xs" /> - News + News
diff --git a/docs/buildingSearchBar.md b/docs/buildingSearchBar.md index be697f529..3949946af 100644 --- a/docs/buildingSearchBar.md +++ b/docs/buildingSearchBar.md @@ -21,39 +21,39 @@ import { FontAwesome5 } from '@expo/vector-icons'; function SearchBar(){ return ( - - + + Cupertino } />} + InputLeftElement={} />} /> - + Material } />} - InputRightElement={} />} + InputLeftElement={} />} + InputRightElement={} />} /> @@ -63,7 +63,7 @@ function SearchBar(){ export default function () { return ( -
+
diff --git a/docs/buildingSwipeList.md b/docs/buildingSwipeList.md index e40c81eba..130e14ed4 100644 --- a/docs/buildingSwipeList.md +++ b/docs/buildingSwipeList.md @@ -27,8 +27,8 @@ export default function App() { return ( - - Swipe list Example + + Swipe list Example @@ -68,9 +68,9 @@ function Basic() { alignItems= 'center' bg="white" borderBottomColor= 'trueGray.200' - borderBottomWidth= {1} + borderBottomWidth= "1" justifyContent= 'center' - height= {50} + height= "50" underlayColor={'#AAA'} _pressed={{ bg:'trueGray.200' @@ -78,9 +78,9 @@ function Basic() { py={8} > - - - + + + {index} @@ -94,11 +94,11 @@ function Basic() { const renderHiddenItem = (data, rowMap) => ( } color='white'/> + flex= "1"> ( - + ); const SecondRoute = () => ( - + ); const ThirdRoute = () => ( - + ); const initialLayout = { width: Dimensions.get('window').width }; @@ -63,9 +63,9 @@ export default function TabViewExample() { return ( - image base - + image base + NEWS - + June 22, 2021 - + The Stunning Dawki River in Meghalaya is So Clear That Boats Appear Floating in Air @@ -49,7 +49,7 @@ function CardComponent(){ export default function () { return ( -
+
diff --git a/docs/container.md b/docs/container.md index 5b34afdc3..a09ac47e5 100644 --- a/docs/container.md +++ b/docs/container.md @@ -38,7 +38,7 @@ function ContainerComponent() { export default function () { return ( -
+
diff --git a/docs/customizingComponents.md b/docs/customizingComponents.md index def40ff7a..05cde5265 100644 --- a/docs/customizingComponents.md +++ b/docs/customizingComponents.md @@ -100,7 +100,7 @@ export default function () { }); return ( -
+
NativeBase
@@ -141,7 +141,7 @@ export default function () { return ( -
+
@@ -186,7 +186,7 @@ function BuildingAFormExample() { export default function () { return ( -
+
diff --git a/docs/hidden.md b/docs/hidden.md index df7ecb077..aa6d0ad9e 100644 --- a/docs/hidden.md +++ b/docs/hidden.md @@ -19,7 +19,7 @@ import { Hidden } from 'native-base'; ```jsx - + This text will be always hidden. @@ -30,12 +30,12 @@ import { Hidden } from 'native-base'; ```jsx <> - + This text will be hidden from sm to lg screens. - + This text will be hidden on sm and lg screens only. @@ -69,14 +69,14 @@ function ColorModeExample () { > Change mode - + - + This text will be hidden on light mode - + This text will be hidden on dark mode @@ -89,7 +89,7 @@ const LocalWrapper = ({ children }) => { const bg = useColorModeValue('gray.200', 'gray.800') return (
{children} @@ -112,7 +112,7 @@ export default function () { ```jsx - + This text will be hidden on android and web. diff --git a/docs/loginsignupforms.md b/docs/loginsignupforms.md index 8890642a2..75b491f6d 100644 --- a/docs/loginsignupforms.md +++ b/docs/loginsignupforms.md @@ -32,8 +32,8 @@ export default function App() { @@ -44,14 +44,14 @@ export default function App() { Sign in to continue! - + Email ID - + Password @@ -59,12 +59,12 @@ export default function App() { Forget Password? - + @@ -142,8 +142,8 @@ export default function App() { @@ -154,7 +154,7 @@ export default function App() { Sign up to continue! - + Email @@ -173,7 +173,7 @@ export default function App() { - + diff --git a/docs/migration/Guide.md b/docs/migration/Guide.md index 2b3095055..782ee3850 100644 --- a/docs/migration/Guide.md +++ b/docs/migration/Guide.md @@ -1,5 +1,5 @@ --- -id: Guide +id: guide title: Guide to v3 --- diff --git a/docs/nativebase-factory.md b/docs/nativebase-factory.md index 69ed5628f..56c3a0ed7 100644 --- a/docs/nativebase-factory.md +++ b/docs/nativebase-factory.md @@ -27,7 +27,7 @@ function FactoryViewExample () { export default function () { return ( -
+
@@ -56,7 +56,7 @@ function FactoryViewExample () { export default function () { return ( -
+
@@ -87,7 +87,7 @@ function FactoryViewModeExample () { export default function () { return ( -
+
@@ -130,7 +130,7 @@ function FactoryViewRefExample () { export default function () { return ( -
+
diff --git a/docs/nativebase-formik-ui.md b/docs/nativebase-formik-ui.md index e1b73f8e8..28e5dee4a 100644 --- a/docs/nativebase-formik-ui.md +++ b/docs/nativebase-formik-ui.md @@ -36,7 +36,7 @@ function FormikExample() { return ( {({ handleChange, handleBlur, handleSubmit, values, errors }) => ( - + First Name {console.log("errors" , errors)} diff --git a/docs/overlay.md b/docs/overlay.md index 4dbcbad8c..f18adee91 100644 --- a/docs/overlay.md +++ b/docs/overlay.md @@ -35,7 +35,7 @@ function OverlayComponent () { export default function () { return ( -
+
@@ -79,7 +79,7 @@ function OverlayComponent () { export default function () { return ( -
+
diff --git a/docs/pseudoProps.md b/docs/pseudoProps.md index 5142576f8..6891dfa7a 100644 --- a/docs/pseudoProps.md +++ b/docs/pseudoProps.md @@ -77,7 +77,7 @@ function Component() { export default function () { return ( -
+
diff --git a/docs/reactHooksForms.md b/docs/reactHooksForms.md index f4efec13c..0063ec32e 100644 --- a/docs/reactHooksForms.md +++ b/docs/reactHooksForms.md @@ -24,7 +24,7 @@ function FormHookExample() { console.log('submiting with ', data); }; return ( - + First Name + Hobbies } > - Darts + Darts } > - Movie + Movie } > - Camping + Camping } > - Chess + Chess )} @@ -186,10 +186,10 @@ function FormHookCheckboxExample() { onChange={(val) => onChange(val)} > - Male + Male - Female + Female )} @@ -235,7 +235,7 @@ function FormHookSelectExample() { console.log('submiting with ', data); }; return ( - + Fav language: { onChange(itemValue); }} @@ -303,7 +303,7 @@ function FormHookSliderExample() { console.log('submiting with ', data); }; return ( - + Amount you like NativeBase + What do you think? + Remenber me: -
+
@@ -69,7 +69,7 @@ function BreakpointExample () { export default function () { return ( -
+
@@ -126,7 +126,7 @@ function BreakpointExample () { export default function () { return ( -
+
diff --git a/docs/setup-provider.md b/docs/setup-provider.md index 91ab8c8b7..6f548dfcd 100644 --- a/docs/setup-provider.md +++ b/docs/setup-provider.md @@ -111,7 +111,7 @@ const config = { export default () => { return ( -
+
diff --git a/docs/textField.md b/docs/textField.md index 0c98d5b26..c5ef290be 100644 --- a/docs/textField.md +++ b/docs/textField.md @@ -30,7 +30,7 @@ function TextFieldComponent () { export default function () { return ( -
+
@@ -63,7 +63,7 @@ function TextFieldComponent () { export default function () { return ( -
+
@@ -110,7 +110,7 @@ function TextFieldComponent () { export default function () { return ( -
+
diff --git a/docs/theme.md b/docs/theme.md index 2432b5f4a..0a7501159 100644 --- a/docs/theme.md +++ b/docs/theme.md @@ -67,7 +67,7 @@ function Tokens() { export default function () { return ( -
+
@@ -106,7 +106,7 @@ function UseContrastingTextHook () { export default function () { return ( -
+
diff --git a/docs/todo-list.md b/docs/todo-list.md index 452dedb23..3db6402e6 100644 --- a/docs/todo-list.md +++ b/docs/todo-list.md @@ -56,23 +56,23 @@ export default function () { }; return ( -
- +
+ Todo App } + icon={} colorScheme="emerald" - ml={1} + ml="1" onPress={() => { addItem(inputValue); setInputValue(""); }} - mr={1}/> + mr="1"/> } onChangeText={(v) => setInputValue(v)} @@ -93,13 +93,13 @@ export default function () { onChange={() => handleStatusChange(itemI)} value={item.title} > - + {item.title} } + icon={} onPress={() => handleDelete(itemI)} /> diff --git a/docs/transition.md b/docs/transition.md index 21c5ba47b..6988f86b7 100644 --- a/docs/transition.md +++ b/docs/transition.md @@ -52,7 +52,7 @@ function FadeExample () { export default function () { return ( -
+
@@ -84,7 +84,7 @@ function ScaleFadeExample () { export default function () { return ( -
+
@@ -116,7 +116,7 @@ function SlideExample () { export default function () { return ( -
+
@@ -164,7 +164,7 @@ function SlideExample () { export default function () { return ( -
+
@@ -214,7 +214,7 @@ function SlideExample () { export default function () { return ( -
+
@@ -246,7 +246,7 @@ function SlideFadeExample () { export default function () { return ( -
+
diff --git a/docs/useAccessibleColors.md b/docs/useAccessibleColors.md index edba126e7..28bb181a1 100644 --- a/docs/useAccessibleColors.md +++ b/docs/useAccessibleColors.md @@ -29,13 +29,13 @@ function UseContrastingTextHook () { key={`teal.${key}`} bg={`teal.${key}`} _text={{ color: colorContrast }} - mb={1} + mb="1" > NativeBase ); })} - @@ -45,7 +45,7 @@ function UseContrastingTextHook () { export default function () { return ( -
+
diff --git a/docs/useBreakPointValue.md b/docs/useBreakPointValue.md index 3e41f90ec..525e7ce96 100644 --- a/docs/useBreakPointValue.md +++ b/docs/useBreakPointValue.md @@ -27,7 +27,7 @@ function UseBreakpointValueExample () { md: 'blue.200', }); return ( - + This is a box ); @@ -35,7 +35,7 @@ function UseBreakpointValueExample () { export default function () { return ( -
+
diff --git a/docs/useClipboard.md b/docs/useClipboard.md index 9aa820956..bcbe6c6bd 100644 --- a/docs/useClipboard.md +++ b/docs/useClipboard.md @@ -39,8 +39,8 @@ function UseClipboardExample() { const [pasteText, setPasteText] = React.useState(""); const { value, onCopy, hasCopied } = useClipboard(); return ( - - + + - + {hasCopied ? "Copied" : "Press here"} -
+
diff --git a/docs/useColorMode.md b/docs/useColorMode.md index 1dc09548d..5aff666af 100644 --- a/docs/useColorMode.md +++ b/docs/useColorMode.md @@ -27,11 +27,11 @@ import { function UseColorMode() { const { colorMode, toggleColorMode } = useColorMode(); return ( -
+
The active color mode is {colorMode} - +
); } diff --git a/docs/useColorModeValue.md b/docs/useColorModeValue.md index 734fb9fc1..2ce63428c 100644 --- a/docs/useColorModeValue.md +++ b/docs/useColorModeValue.md @@ -27,12 +27,12 @@ import { function UseColorMode() { const { colorMode, toggleColorMode } = useColorMode(); return ( -
+
The active color mode is {useColorModeValue('Light', 'Dark')} - +
); } diff --git a/docs/useContrastText.md b/docs/useContrastText.md index 73b9bca1a..da3131fe7 100644 --- a/docs/useContrastText.md +++ b/docs/useContrastText.md @@ -40,7 +40,7 @@ function UseContrastingTextHook () { export default function () { return ( -
+
@@ -68,13 +68,13 @@ function UseContrastingTextHook () { key={`teal.${key}`} bg={`teal.${key}`} _text={{ color: colorContrast }} - mb={1} + mb="1" > NativeBase ); })} - @@ -84,7 +84,7 @@ function UseContrastingTextHook () { export default function () { return ( -
+
diff --git a/docs/useDisclosure.md b/docs/useDisclosure.md index 3abc6c3f4..70a9e2f16 100644 --- a/docs/useDisclosure.md +++ b/docs/useDisclosure.md @@ -39,10 +39,10 @@ function UseDiscloseExample() { cupiditate expedita, ipsa corporis officia totam similique delectus! Debitis esse, ea blanditiis iste enim iure at odit fugiat autem. Accusamus? - + - @@ -56,7 +56,7 @@ function UseDiscloseExample() { export default function () { return ( -
+
diff --git a/docs/useMediaQuery.md b/docs/useMediaQuery.md index 6d184579f..b74c32483 100644 --- a/docs/useMediaQuery.md +++ b/docs/useMediaQuery.md @@ -20,7 +20,7 @@ import React from "react"; import { Text, useMediaQuery, NativeBaseProvider, Center } from "native-base"; function UseMediaQueryExample() { - const [isSmaller] = useMediaQuery({ maxHeight: 512 }); + const [isSmaller] = useMediaQuery({ maxHeight: '512' }); return ( {isSmaller ? "Height smaller than 512" : "Height larger than 512"} @@ -30,7 +30,7 @@ function UseMediaQueryExample() { export default function () { return ( -
+
@@ -45,7 +45,7 @@ import React from "react"; import { Text, useMediaQuery, NativeBaseProvider, Center } from "native-base"; function UseMediaQueryExample() { - const [isLargerThan512] = useMediaQuery({ minWidth: 512 }); + const [isLargerThan512] = useMediaQuery({ minWidth: '512' }); return ( {isLargerThan512 ? "Width larger than 512" : "Width smaller than 512"} @@ -55,7 +55,7 @@ function UseMediaQueryExample() { export default function () { return ( -
+
@@ -84,7 +84,7 @@ function UseMediaQueryExample() { export default function () { return ( -
+
diff --git a/docs/usePopOver.md b/docs/usePopOver.md index 35bdb98a6..af604254e 100644 --- a/docs/usePopOver.md +++ b/docs/usePopOver.md @@ -42,7 +42,7 @@ function UsePopoverExample() { export default function () { return ( -
+
diff --git a/docs/useToken.md b/docs/useToken.md index ec7c572da..06ff1d0ff 100644 --- a/docs/useToken.md +++ b/docs/useToken.md @@ -35,7 +35,7 @@ function UseTokenHookExample() { export default function () { return ( -
+
diff --git a/docs/utilityProps.md b/docs/utilityProps.md index bab667a34..da84424a5 100644 --- a/docs/utilityProps.md +++ b/docs/utilityProps.md @@ -34,7 +34,7 @@ function Component() { export default function () { return ( -
+
@@ -92,7 +92,7 @@ function Component() { export default function () { return ( -
+
@@ -156,7 +156,7 @@ export function Example() { export default () => { return ( -
+
@@ -193,7 +193,7 @@ function Component() { export default function () { return ( -
+
@@ -247,7 +247,7 @@ function Component() { export default function () { return ( -
+
@@ -303,7 +303,7 @@ function Component() { export default function () { return ( -
+
@@ -352,7 +352,7 @@ function Component() { export default function () { return ( -
+
@@ -413,7 +413,7 @@ function Component() { export default function () { return ( -
+
@@ -458,7 +458,7 @@ function Component() { export default function () { return ( -
+
@@ -503,7 +503,7 @@ function Component() { export default function () { return ( -
+
@@ -546,7 +546,7 @@ function Example() { export default function () { return ( -
+
@@ -589,7 +589,7 @@ function Example() { export default function () { return ( -
+
@@ -636,7 +636,7 @@ function Example() { export default function () { return ( -
+
diff --git a/nb-plugins/storybook-example-transformer/index.js b/nb-plugins/storybook-example-transformer/index.js index 514aec533..dca63fada 100644 --- a/nb-plugins/storybook-example-transformer/index.js +++ b/nb-plugins/storybook-example-transformer/index.js @@ -61,7 +61,7 @@ const endingTemplate = ` export default () => { return ( -
+
diff --git a/sidebars.js b/sidebars.js index dc34c8182..3073344a0 100644 --- a/sidebars.js +++ b/sidebars.js @@ -250,7 +250,7 @@ module.exports = { label: 'Migration', collapsed: false, items: [ - 'migration/Guide', + 'migration/guide', 'migration/v3.1.0-to-3.2.0', { 'Components Migration': [ From a5f47037c9e39a1016ace09a1a9822e347aeb786 Mon Sep 17 00:00:00 2001 From: madhav23bansal Date: Mon, 13 Sep 2021 12:05:22 +0530 Subject: [PATCH 2/2] v31tov32 slug changed --- docs/migration/v31tov32.md | 2 +- sidebars.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/migration/v31tov32.md b/docs/migration/v31tov32.md index efa3ee6c6..2c27097b3 100644 --- a/docs/migration/v31tov32.md +++ b/docs/migration/v31tov32.md @@ -1,5 +1,5 @@ --- -id: v3.1.0-to-3.2.0 +id: migration-guide title: Upgrading to 3.2.0 --- diff --git a/sidebars.js b/sidebars.js index 3073344a0..ef44a2a4a 100644 --- a/sidebars.js +++ b/sidebars.js @@ -251,7 +251,7 @@ module.exports = { collapsed: false, items: [ 'migration/guide', - 'migration/v3.1.0-to-3.2.0', + 'migration/migration-guide', { 'Components Migration': [ // 'migration/Accordion',