From b3ec8fa95e50440c07592a816851359ed6263f3a Mon Sep 17 00:00:00 2001 From: amars29 Date: Mon, 11 Apr 2022 18:15:29 +0530 Subject: [PATCH] updated storybook examples --- package.json | 2 +- src/nb/NativeBase | 2 +- src/nb/components/Wrapper.tsx | 35 ++++++ src/nb/components/basic/FlatList/Basic.tsx | 4 +- src/nb/components/basic/ScrollView/Basic.tsx | 100 +++++++++--------- .../composites/Actionsheet/Icon.tsx | 50 +-------- .../composites/Actionsheet/Usage.tsx | 2 +- src/nb/components/composites/Alert/action.tsx | 3 +- src/nb/components/composites/Alert/basic.tsx | 3 +- .../composites/Alert/colorScheme.tsx | 3 +- .../composites/Alert/composition.tsx | 3 +- .../composites/Alert/knobEnabled.tsx | 6 +- src/nb/components/composites/Alert/status.tsx | 3 +- src/nb/components/composites/Alert/usage.tsx | 3 +- .../components/composites/Divider/Basic.tsx | 6 +- .../composites/Divider/Orientation.tsx | 13 ++- src/nb/components/composites/Menu/Basic.tsx | 2 +- src/nb/components/composites/Menu/Group.tsx | 2 +- .../composites/Menu/MenuOptionsGroup.tsx | 2 +- .../components/composites/Popover/Basic.tsx | 2 +- .../composites/Popover/PopoverPositions.tsx | 2 +- .../components/composites/Popover/RefEg.tsx | 2 +- src/nb/components/primitives/Input/Basic.tsx | 2 +- .../primitives/Input/Controlled.tsx | 3 +- src/nb/components/primitives/Input/Masked.tsx | 3 +- src/nb/components/primitives/Input/Size.tsx | 20 ++-- .../components/primitives/Input/Variant.tsx | 4 +- .../components/primitives/Pressable/Basic.tsx | 22 ++-- .../primitives/Pressable/Events.tsx | 15 +-- yarn.lock | 12 +-- 30 files changed, 171 insertions(+), 160 deletions(-) diff --git a/package.json b/package.json index 1a7f229..711289b 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "expo-status-bar": "~1.0.4", "expo-updates": "~0.5.4", "fs-extra": "^10.0.0", - "native-base": "3.4.0-rc.1", + "native-base": "3.4.0-rc.12", "react": "16.13.1", "react-dom": "16.13.1", "react-native": "0.63.4", diff --git a/src/nb/NativeBase b/src/nb/NativeBase index 2c0275e..4da5260 160000 --- a/src/nb/NativeBase +++ b/src/nb/NativeBase @@ -1 +1 @@ -Subproject commit 2c0275e7caa7dea2503e176340d2a961898df1d3 +Subproject commit 4da5260364f1923c89f9f86326bdfaf85e28623b diff --git a/src/nb/components/Wrapper.tsx b/src/nb/components/Wrapper.tsx index ddc43bc..bc318ce 100644 --- a/src/nb/components/Wrapper.tsx +++ b/src/nb/components/Wrapper.tsx @@ -11,6 +11,7 @@ import { SunIcon, extendTheme, Button, + Input, } from 'native-base'; import type { StorageManager } from 'native-base'; import AsyncStorage from '@react-native-async-storage/async-storage'; @@ -21,6 +22,11 @@ const myTheme = extendTheme({ space: { mySpace: '29px', }, + colors: { + blue1: { + '100': 'blue', + }, + }, components: { Link: { @@ -38,6 +44,12 @@ const myTheme = extendTheme({ padding: myPaddingX, }; }, + + myNewButton1: (props: any) => { + return { + padding: props.padding, + }; + }, }, sizes: { newsize: ({ mySize }: { mySize: number }) => { @@ -48,6 +60,27 @@ const myTheme = extendTheme({ }, }, + Input: { + variants: { + newsize: ({ mySize }: { mySize: number }) => { + return { + padding: mySize, + }; + }, + + newsize1: (props: any) => { + return { + padding: props.padding, + }; + }, + }, + sizes: { + 'my-size': { + padding: 2, + }, + }, + }, + Checkbox: { sizes: { myBtn: { @@ -115,7 +148,9 @@ export function RenderTestButton() { const [state, setState] = React.useState(1); return ( +