GeezerVison is showing github.com — Merge pull request #5533 from GeekyAnts/release/3.4.21 · sleede/NativeBase@5c52b85
File treeExpand file treeCollapse file tree Open diff view settings example/storybook/stories/components
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: example/storybook/stories/components/Wrapper.tsx +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -123,7 +123,7 @@ function MyWrapper({ children }: any) { | 123 | 123 | bg={bgColor} | 124 | 124 | safeAreaY | 125 | 125 | > | 126 | | - {/* <Tooltip | | 126 | + <Tooltip | 127 | 127 | label={colorMode === 'dark' ? 'Enable light mode' : 'Enable dark mode'} | 128 | 128 | placement="bottom right" | 129 | 129 | openDelay={300} | @@ -138,7 +138,7 @@ function MyWrapper({ children }: any) { | 138 | 138 | icon={colorMode === 'dark' ? <SunIcon /> : <MoonIcon />} | 139 | 139 | size="lg" | 140 | 140 | /> | 141 | | - </Tooltip> */} | | 141 | + </Tooltip> | 142 | 142 | {children} | 143 | 143 | </Box> | 144 | 144 | ); | |
Collapse file Copy file name to clipboardExpand all lines: example/storybook/stories/components/primitives/Input/Addons.tsx +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -10,8 +10,8 @@ import { | 10 | 10 |
| 11 | 11 | export const Example = () => { | 12 | 12 | return ( | 13 | | - <Stack alignItems="center"> | 14 | | - <InputGroup w={{ base: '70%', md: '285' }}> | | 13 | + <Stack> | | 14 | + <InputGroup w={{ base: '70%', md: '285' }} justifyContent="center"> | 15 | 15 | <InputLeftAddon children={'https://'} /> | 16 | 16 | <Input w={{ base: '70%', md: '100%' }} placeholder="nativebase" /> | 17 | 17 | <InputRightAddon children={'.io'} /> | |
Collapse file Copy file name to clipboardExpand all lines: example/storybook/stories/components/primitives/Select/FormControlled.tsx +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -10,7 +10,7 @@ import { | 10 | 10 | export const Example = () => { | 11 | 11 | return ( | 12 | 12 | <Center> | 13 | | - <FormControl w="3/4" maxW="300" isRequired isInvalid> | | 13 | + <FormControl maxW="300" isRequired isInvalid> | 14 | 14 | <FormControl.Label>Choose service</FormControl.Label> | 15 | 15 | <Select | 16 | 16 | minWidth="200" | |
Collapse file Copy file name to clipboardExpand all lines: example/storybook/stories/components/primitives/Select/SelectLongList.tsx +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -54,11 +54,11 @@ export const Example = () => { | 54 | 54 | ]; | 55 | 55 | return ( | 56 | 56 | <Container> | 57 | | - <FormControl> | | 57 | + <FormControl maxW="300"> | 58 | 58 | <FormControl.Label>Select Color</FormControl.Label> | 59 | 59 | <Select | 60 | 60 | selectedValue={value} | 61 | | - minWidth="100" | | 61 | + minWidth="200" | 62 | 62 | accessibilityLabel="Select a Color" | 63 | 63 | placeholder="Select a Color" | 64 | 64 | onValueChange={(itemValue) => { | |
Collapse file Copy file name to clipboardExpand all lines: package.json +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 36 | 36 | "prettier --write" | 37 | 37 | ] | 38 | 38 | }, | 39 | | - "version": "3.4.20", | | 39 | + "version": "3.4.21", | 40 | 40 | "license": "MIT", | 41 | 41 | "private": false, | 42 | 42 | "main": "lib/commonjs/index", | |
Collapse file Copy file name to clipboardExpand all lines: src/components/composites/Avatar/Group.tsx +12-24Lines changed: 12 additions & 24 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -22,7 +22,6 @@ const getAvatarGroupChildren = ( | 22 | 22 | plusAvatars = childrenArray.length - max; | 23 | 23 | childrenArray = childrenArray.slice(0, max); | 24 | 24 | } | 25 | | - const trailingChildren = childrenArray.slice(1); | 26 | 25 | const spacingProps = { | 27 | 26 | ml: isVertical ? 0 : space, | 28 | 27 | mt: isVertical ? space : 0, | @@ -38,29 +37,18 @@ const getAvatarGroupChildren = ( | 38 | 37 | {'+ ' + plusAvatars} | 39 | 38 | </Avatar> | 40 | 39 | ) : null, | 41 | | - React.Children.map( | 42 | | - trailingChildren.reverse(), | 43 | | - (child: any, index: number) => { | 44 | | - return React.cloneElement( | 45 | | - child, | 46 | | - { | 47 | | - key: `avatar-group-child-${index}`, | 48 | | - ..._avatar, | 49 | | - ...spacingProps, | 50 | | - ...child.props, | 51 | | - }, | 52 | | - child.props.children | 53 | | - ); | 54 | | - } | 55 | | - ), | 56 | | - React.cloneElement( | 57 | | - childrenArray[0], | 58 | | - { | 59 | | - ..._avatar, | 60 | | - ...childrenArray[0].props, | 61 | | - }, | 62 | | - childrenArray[0].props.children | 63 | | - ), | | 40 | + React.Children.map(childrenArray.reverse(), (child: any, index: number) => { | | 41 | + return React.cloneElement( | | 42 | + child, | | 43 | + { | | 44 | + key: `avatar-group-child-${index}`, | | 45 | + ..._avatar, | | 46 | + ...spacingProps, | | 47 | + ...child.props, | | 48 | + }, | | 49 | + child.props.children | | 50 | + ); | | 51 | + }), | 64 | 52 | ]; | 65 | 53 | }; | 66 | 54 |
| |
Collapse file Copy file name to clipboardExpand all lines: src/components/composites/Popover/Popover.tsx +2-1Lines changed: 2 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -27,6 +27,7 @@ const Popover = ( | 27 | 27 | finalFocusRef, | 28 | 28 | useRNModal, | 29 | 29 | trapFocus = true, | | 30 | + _backdrop, | 30 | 31 | ...props | 31 | 32 | }: IPopoverProps, | 32 | 33 | ref: any | @@ -101,7 +102,7 @@ const Popover = ( | 101 | 102 | style={StyleSheet.absoluteFill} | 102 | 103 | > | 103 | 104 | <Popper onClose={handleClose} triggerRef={triggerRef} {...props}> | 104 | | - <Backdrop onPress={handleClose} bg="transparent" /> | | 105 | + <Backdrop onPress={handleClose} bg="transparent" {..._backdrop} /> | 105 | 106 | <PopoverContext.Provider | 106 | 107 | value={{ | 107 | 108 | onClose: handleClose, | |
Collapse file Copy file name to clipboardExpand all lines: src/components/composites/Popover/types.ts +4Lines changed: 4 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -103,6 +103,10 @@ export interface InterfacePopoverProps { | 103 | 103 | * @default false | 104 | 104 | */ | 105 | 105 | useRNModal?: boolean; | | 106 | + /** | | 107 | + * Props applied on backdrop. | | 108 | + */ | | 109 | + _backdrop?: any; | 106 | 110 | } | 107 | 111 |
| 108 | 112 | export type IPopoverContentImpl = { | |
Collapse file Copy file name to clipboardExpand all lines: src/factory/component.tsx +3-2Lines changed: 3 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -9,11 +9,12 @@ export default function Factory<P>( | 9 | 9 | componentTheme?: ComponentTheme | 10 | 10 | ) { | 11 | 11 | return React.forwardRef( | 12 | | - ({ children, ...props }: P & FactoryComponentProps, ref: any) => { | | 12 | + ({ children, _state, ...props }: P & FactoryComponentProps, ref: any) => { | 13 | 13 | const StyledComponent = useMemo(() => makeStyledComponent(Component), []); | 14 | 14 | const calculatedProps = usePropsWithComponentTheme( | 15 | 15 | componentTheme ?? {}, | 16 | | - props | | 16 | + props, | | 17 | + _state | 17 | 18 | ); | 18 | 19 | return ( | 19 | 20 | <StyledComponent {...(calculatedProps as P)} ref={ref}> | |
Collapse file Copy file name to clipboard +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | 1 | import type { PlatformProps } from '../components/types'; | 2 | 2 | import type { StyledProps } from '../theme/types'; | | 3 | +import type { IStateProps } from '../hooks/useThemeProps/propsFlattener'; | 3 | 4 |
| 4 | 5 | export type FactoryComponentProps = StyledProps & | 5 | 6 | PlatformProps<StyledProps> & { | 6 | 7 | children?: string | JSX.Element | JSX.Element[]; | | 8 | + _state?: IStateProps; | 7 | 9 | }; |
|