docstring_tokens
stringlengths
0
76.5k
code_tokens
stringlengths
75
1.81M
label_window
listlengths
4
2.12k
html_url
stringlengths
74
116
file_name
stringlengths
3
311
}, { ...this.props.iosIcon.props.style }]
<mask> style: { <mask> fontSize: 22, <mask> lineHeight: 26, <mask> color: this.props.placeholderIconColor <mask> } <mask> }); <mask> } <mask> <mask> renderButton() { <mask> const onPress = () => { </s> Added support to style iosIcon of picker. Fix for issue #1843 (How can I style picker's iosIcon) </s> remove return <Picker.Item {...this.props() } />; </s> add return <Picker.Item {...this.props()} />; </s> remove style: { </s> add style: [{
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/8f13d6408d1fbb01bc23bb9ce57dec9053752792
src/basic/Picker.ios.js
return <Picker.Item {...this.props()} />;
<mask> } <mask> <mask> PickerNB.Item = createReactClass({ <mask> render() { <mask> return <Picker.Item {...this.props() } />; <mask> } <mask> }); <mask> <mask> PickerNB.propTypes = { <mask> ...ViewPropTypes, </s> Added support to style iosIcon of picker. Fix for issue #1843 (How can I style picker's iosIcon) </s> remove style: { </s> add style: [{ </s> remove } </s> add }, { ...this.props.iosIcon.props.style }]
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/8f13d6408d1fbb01bc23bb9ce57dec9053752792
src/basic/Picker.ios.js
import { Example as Basic } from './Basic'; import { Example as Size } from './Size'; import { Example as Variant } from './Variant'; import { Example as Addons } from './Addons'; import { Example as Elements } from './Elements'; import { Example as Masked } from './Masked'; import { Example as Controlled } from './Controlled'; import { Example as FormControlled } from './FormControlled';
<mask> import React from 'react'; <mask> import { storiesOf } from '@storybook/react-native'; <mask> import { withKnobs } from '@storybook/addon-knobs'; <mask> import Wrapper from './../../Wrapper'; <mask> import { <mask> DefaultInput, <mask> SizeInput, <mask> VariantInput, <mask> InputAddons, <mask> InputElements, <mask> PasswordInput, <mask> ControlledInput, <mask> FormControlled, <mask> } from './example'; <mask> <mask> storiesOf('Input', module) <mask> .addDecorator(withKnobs) <mask> .addDecorator((getStory: any) => <Wrapper>{getStory()}</Wrapper>) <mask> .add('Primary', () => <DefaultInput />) </s> fix: updated Input and textarea </s> remove import { Example as TextArea } from './example'; </s> add import { Example as TextArea } from './basic'; </s> remove .add('Primary', () => <DefaultInput />) .add('Size Input', () => <SizeInput />) .add('Input Variants', () => <VariantInput />) .add('Input Addons', () => <InputAddons />) .add('Input Elements', () => <InputElements />) .add('Input Password', () => <PasswordInput />) .add('Value Controlled Input', () => <ControlledInput />) </s> add .add('Primary', () => <Basic />) .add('Size ', () => <Size />) .add('Variants', () => <Variant />) .add('Addons', () => <Addons />) .add('Elements', () => <Elements />) .add('Password', () => <Masked />) .add('Value Controlled', () => <Controlled />) </s> remove import { useColorModeValue } from '../../../core/color-mode/hooks'; </s> add </s> remove import React from 'react'; import { default as Box, IBoxProps } from '../Box'; import type { IInputProps } from '../Input'; </s> add import React, { memo, forwardRef } from 'react'; import type { IInputGroupProps } from './types'; </s> remove import React from 'react'; </s> add import React, { memo, forwardRef } from 'react';
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/8f28a61bec6baab429d8912303c18fe812579e42
example/storybook/stories/components/primitives/Input/index.tsx
.add('Primary', () => <Basic />) .add('Size ', () => <Size />) .add('Variants', () => <Variant />) .add('Addons', () => <Addons />) .add('Elements', () => <Elements />) .add('Password', () => <Masked />) .add('Value Controlled', () => <Controlled />)
<mask> <mask> storiesOf('Input', module) <mask> .addDecorator(withKnobs) <mask> .addDecorator((getStory: any) => <Wrapper>{getStory()}</Wrapper>) <mask> .add('Primary', () => <DefaultInput />) <mask> .add('Size Input', () => <SizeInput />) <mask> .add('Input Variants', () => <VariantInput />) <mask> .add('Input Addons', () => <InputAddons />) <mask> .add('Input Elements', () => <InputElements />) <mask> .add('Input Password', () => <PasswordInput />) <mask> .add('Value Controlled Input', () => <ControlledInput />) <mask> .add('Form Controlled', () => <FormControlled />); </s> fix: updated Input and textarea </s> remove import { DefaultInput, SizeInput, VariantInput, InputAddons, InputElements, PasswordInput, ControlledInput, FormControlled, } from './example'; </s> add import { Example as Basic } from './Basic'; import { Example as Size } from './Size'; import { Example as Variant } from './Variant'; import { Example as Addons } from './Addons'; import { Example as Elements } from './Elements'; import { Example as Masked } from './Masked'; import { Example as Controlled } from './Controlled'; import { Example as FormControlled } from './FormControlled'; </s> remove const demoValueControlledTextArea = (e: any) => { </s> add const demoValueControlledTextArea = (e) => { </s> remove {Sizes.map((value: string) => { </s> add {Sizes.map((value) => { </s> remove const Sizes: any = ['xs', 'sm', 'md', 'lg', 'xl', '2xl']; </s> add const Sizes = ['xs', 'sm', 'md', 'lg', 'xl', '2xl']; </s> remove export const InputGroup = React.memo( React.forwardRef(({ children, ...props }: InputGroupProps, ref: any) => { </s> add export const InputGroup = memo( forwardRef(({ children, ...props }: IInputGroupProps, ref: any) => {
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/8f28a61bec6baab429d8912303c18fe812579e42
example/storybook/stories/components/primitives/Input/index.tsx
import { Example as TextArea } from './basic';
<mask> import React from 'react'; <mask> import { storiesOf } from '@storybook/react-native'; <mask> import { withKnobs } from '@storybook/addon-knobs'; <mask> import Wrapper from './../../Wrapper'; <mask> import { Example as TextArea } from './example'; <mask> import { Example as Invalid } from './invalid'; <mask> import { Example as Size } from './size'; <mask> import { Example as Value } from './value'; <mask> <mask> storiesOf('TextArea', module) </s> fix: updated Input and textarea </s> remove import { DefaultInput, SizeInput, VariantInput, InputAddons, InputElements, PasswordInput, ControlledInput, FormControlled, } from './example'; </s> add import { Example as Basic } from './Basic'; import { Example as Size } from './Size'; import { Example as Variant } from './Variant'; import { Example as Addons } from './Addons'; import { Example as Elements } from './Elements'; import { Example as Masked } from './Masked'; import { Example as Controlled } from './Controlled'; import { Example as FormControlled } from './FormControlled'; </s> remove import React from 'react'; import { default as Box, IBoxProps } from '../Box'; import type { IInputProps } from '../Input'; </s> add import React, { memo, forwardRef } from 'react'; import type { IInputGroupProps } from './types'; </s> remove import { useColorModeValue } from '../../../core/color-mode/hooks'; </s> add </s> remove import React from 'react'; </s> add import React, { memo, forwardRef } from 'react'; </s> remove import React from 'react'; </s> add import React, { memo, forwardRef } from 'react';
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/8f28a61bec6baab429d8912303c18fe812579e42
example/storybook/stories/components/primitives/TextArea/index.tsx
const Sizes = ['xs', 'sm', 'md', 'lg', 'xl', '2xl'];
<mask> import React from 'react'; <mask> import { TextArea, Stack } from 'native-base'; <mask> <mask> export const Example = () => { <mask> const Sizes: any = ['xs', 'sm', 'md', 'lg', 'xl', '2xl']; <mask> return ( <mask> <Stack space={4} w="90%"> <mask> {Sizes.map((value: string) => { <mask> return <TextArea key={value} size={value} placeholder={value} />; <mask> })} </s> fix: updated Input and textarea </s> remove {Sizes.map((value: string) => { </s> add {Sizes.map((value) => { </s> remove const demoValueControlledTextArea = (e: any) => { </s> add const demoValueControlledTextArea = (e) => { </s> remove }; </s> add } </s> remove export const InputLeftAddon = React.memo( React.forwardRef((props: IBoxProps & IInputProps, ref?: any) => { const addonsDefaultStyle = { p: 3, borderColor: useColorModeValue('gray.300', 'gray.600'), borderWidth: 1, }; return ( <Box {...addonsDefaultStyle} borderRightWidth={0} roundedLeft={4} bg={useColorModeValue('gray.50', 'gray.700')} {...props} ref={ref} > <Box m="auto" _text={props._text || { fontWeight: 600 }}> {props.children} </Box> </Box> ); }) ); export const InputRightAddon = React.memo( React.forwardRef((props: IBoxProps & IInputProps, ref?: any) => { const addonsDefaultStyle = { p: 3, borderColor: useColorModeValue('gray.300', 'gray.600'), borderWidth: 1, }; return ( <Box {...addonsDefaultStyle} borderLeftWidth={0} roundedRight={4} bg={useColorModeValue('gray.50', 'gray.700')} {...props} ref={ref} > <Box m="auto" _text={props._text || { fontWeight: 600 }}> {props.children} </Box> </Box> ); }) ); type InputGroupProps = IBoxProps & { children: JSX.Element | JSX.Element[]; variant?: string; size?: string; }; </s> add </s> remove import { DefaultInput, SizeInput, VariantInput, InputAddons, InputElements, PasswordInput, ControlledInput, FormControlled, } from './example'; </s> add import { Example as Basic } from './Basic'; import { Example as Size } from './Size'; import { Example as Variant } from './Variant'; import { Example as Addons } from './Addons'; import { Example as Elements } from './Elements'; import { Example as Masked } from './Masked'; import { Example as Controlled } from './Controlled'; import { Example as FormControlled } from './FormControlled';
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/8f28a61bec6baab429d8912303c18fe812579e42
example/storybook/stories/components/primitives/TextArea/size.tsx
{Sizes.map((value) => {
<mask> export const Example = () => { <mask> const Sizes: any = ['xs', 'sm', 'md', 'lg', 'xl', '2xl']; <mask> return ( <mask> <Stack space={4} w="90%"> <mask> {Sizes.map((value: string) => { <mask> return <TextArea key={value} size={value} placeholder={value} />; <mask> })} <mask> </Stack> <mask> ); <mask> }; </s> fix: updated Input and textarea </s> remove const Sizes: any = ['xs', 'sm', 'md', 'lg', 'xl', '2xl']; </s> add const Sizes = ['xs', 'sm', 'md', 'lg', 'xl', '2xl']; </s> remove const demoValueControlledTextArea = (e: any) => { </s> add const demoValueControlledTextArea = (e) => { </s> remove export const InputLeftAddon = React.memo( React.forwardRef((props: IBoxProps & IInputProps, ref?: any) => { const addonsDefaultStyle = { p: 3, borderColor: useColorModeValue('gray.300', 'gray.600'), borderWidth: 1, }; return ( <Box {...addonsDefaultStyle} borderRightWidth={0} roundedLeft={4} bg={useColorModeValue('gray.50', 'gray.700')} {...props} ref={ref} > <Box m="auto" _text={props._text || { fontWeight: 600 }}> {props.children} </Box> </Box> ); }) ); export const InputRightAddon = React.memo( React.forwardRef((props: IBoxProps & IInputProps, ref?: any) => { const addonsDefaultStyle = { p: 3, borderColor: useColorModeValue('gray.300', 'gray.600'), borderWidth: 1, }; return ( <Box {...addonsDefaultStyle} borderLeftWidth={0} roundedRight={4} bg={useColorModeValue('gray.50', 'gray.700')} {...props} ref={ref} > <Box m="auto" _text={props._text || { fontWeight: 600 }}> {props.children} </Box> </Box> ); }) ); type InputGroupProps = IBoxProps & { children: JSX.Element | JSX.Element[]; variant?: string; size?: string; }; </s> add </s> remove }; </s> add } </s> remove export const InputGroup = React.memo( React.forwardRef(({ children, ...props }: InputGroupProps, ref: any) => { </s> add export const InputGroup = memo( forwardRef(({ children, ...props }: IInputGroupProps, ref: any) => {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/8f28a61bec6baab429d8912303c18fe812579e42
example/storybook/stories/components/primitives/TextArea/size.tsx
const demoValueControlledTextArea = (e) => {
<mask> import { TextArea, Stack } from 'native-base'; <mask> <mask> export const Example = () => { <mask> const [textAreaValue, setTextAreaValue] = useState('Value Controlled'); <mask> const demoValueControlledTextArea = (e: any) => { <mask> setTextAreaValue(e.currentTarget.value); <mask> }; <mask> return ( <mask> <Stack space={4} w="90%"> <mask> <TextArea value={textAreaValue} onChange={demoValueControlledTextArea} /> </s> fix: updated Input and textarea </s> remove const Sizes: any = ['xs', 'sm', 'md', 'lg', 'xl', '2xl']; </s> add const Sizes = ['xs', 'sm', 'md', 'lg', 'xl', '2xl']; </s> remove {Sizes.map((value: string) => { </s> add {Sizes.map((value) => { </s> remove }; </s> add } </s> remove export const InputLeftAddon = React.memo( React.forwardRef((props: IBoxProps & IInputProps, ref?: any) => { const addonsDefaultStyle = { p: 3, borderColor: useColorModeValue('gray.300', 'gray.600'), borderWidth: 1, }; return ( <Box {...addonsDefaultStyle} borderRightWidth={0} roundedLeft={4} bg={useColorModeValue('gray.50', 'gray.700')} {...props} ref={ref} > <Box m="auto" _text={props._text || { fontWeight: 600 }}> {props.children} </Box> </Box> ); }) ); export const InputRightAddon = React.memo( React.forwardRef((props: IBoxProps & IInputProps, ref?: any) => { const addonsDefaultStyle = { p: 3, borderColor: useColorModeValue('gray.300', 'gray.600'), borderWidth: 1, }; return ( <Box {...addonsDefaultStyle} borderLeftWidth={0} roundedRight={4} bg={useColorModeValue('gray.50', 'gray.700')} {...props} ref={ref} > <Box m="auto" _text={props._text || { fontWeight: 600 }}> {props.children} </Box> </Box> ); }) ); type InputGroupProps = IBoxProps & { children: JSX.Element | JSX.Element[]; variant?: string; size?: string; }; </s> add </s> remove export type ITextAreaProps = IInputProps & { </s> add export interface ITextAreaProps extends IInputProps { /** * Maps to react-native TextInput's numberOfLines. */
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/8f28a61bec6baab429d8912303c18fe812579e42
example/storybook/stories/components/primitives/TextArea/value.tsx
import React, { memo, forwardRef } from 'react';
<mask> import React from 'react'; <mask> import InputBase from './InputBase'; <mask> import InputAdvanced from './InputAdvanced'; <mask> import type { IInputProps } from './types'; <mask> import { useFormControl } from '../../composites/FormControl'; <mask> </s> fix: updated Input and textarea </s> remove import React from 'react'; </s> add import React, { memo, forwardRef } from 'react'; </s> remove import React from 'react'; import { default as Box, IBoxProps } from '../Box'; import type { IInputProps } from '../Input'; </s> add import React, { memo, forwardRef } from 'react'; import type { IInputGroupProps } from './types'; </s> remove import { useColorModeValue } from '../../../core/color-mode/hooks'; </s> add </s> remove import React from 'react'; </s> add import React, { memo, forwardRef } from 'react'; </s> remove import { Example as TextArea } from './example'; </s> add import { Example as TextArea } from './basic';
[ "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/8f28a61bec6baab429d8912303c18fe812579e42
src/components/primitives/Input/Input.tsx
export default memo(forwardRef(Input));
<mask> return <InputAdvanced {...props} ref={ref} inputProps={inputProps} />; <mask> else return <InputBase {...props} ref={ref} inputProps={inputProps} />; <mask> }; <mask> <mask> export default React.memo(React.forwardRef(Input)); </s> fix: updated Input and textarea </s> remove export const InputLeftAddon = React.memo( React.forwardRef((props: IBoxProps & IInputProps, ref?: any) => { const addonsDefaultStyle = { p: 3, borderColor: useColorModeValue('gray.300', 'gray.600'), borderWidth: 1, }; return ( <Box {...addonsDefaultStyle} borderRightWidth={0} roundedLeft={4} bg={useColorModeValue('gray.50', 'gray.700')} {...props} ref={ref} > <Box m="auto" _text={props._text || { fontWeight: 600 }}> {props.children} </Box> </Box> ); }) ); export const InputRightAddon = React.memo( React.forwardRef((props: IBoxProps & IInputProps, ref?: any) => { const addonsDefaultStyle = { p: 3, borderColor: useColorModeValue('gray.300', 'gray.600'), borderWidth: 1, }; return ( <Box {...addonsDefaultStyle} borderLeftWidth={0} roundedRight={4} bg={useColorModeValue('gray.50', 'gray.700')} {...props} ref={ref} > <Box m="auto" _text={props._text || { fontWeight: 600 }}> {props.children} </Box> </Box> ); }) ); type InputGroupProps = IBoxProps & { children: JSX.Element | JSX.Element[]; variant?: string; size?: string; }; </s> add </s> remove {Sizes.map((value: string) => { </s> add {Sizes.map((value) => { </s> remove const Sizes: any = ['xs', 'sm', 'md', 'lg', 'xl', '2xl']; </s> add const Sizes = ['xs', 'sm', 'md', 'lg', 'xl', '2xl']; </s> remove export default React.memo(React.forwardRef(TextArea)); </s> add export default memo(forwardRef(TextArea)); </s> remove export default React.memo(React.forwardRef(InputAdvance)); </s> add export default memo(forwardRef(InputAdvance));
[ "keep", "keep", "keep", "keep", "replace" ]
https://github.com/GeekyAnts/NativeBase/commit/8f28a61bec6baab429d8912303c18fe812579e42
src/components/primitives/Input/Input.tsx
import React, { memo, forwardRef } from 'react';
<mask> import React from 'react'; <mask> import InputBase from './InputBase'; <mask> import Box from '../Box'; <mask> import type { IInputProps } from './types'; <mask> import { usePropsResolution } from '../../../hooks/useThemeProps'; <mask> import { extractInObject, stylingProps } from '../../../theme/tools/utils'; </s> fix: updated Input and textarea </s> remove import React from 'react'; </s> add import React, { memo, forwardRef } from 'react'; </s> remove import React from 'react'; import { default as Box, IBoxProps } from '../Box'; import type { IInputProps } from '../Input'; </s> add import React, { memo, forwardRef } from 'react'; import type { IInputGroupProps } from './types'; </s> remove import React from 'react'; </s> add import React, { memo, forwardRef } from 'react'; </s> remove import { useColorModeValue } from '../../../core/color-mode/hooks'; </s> add </s> remove import { Example as TextArea } from './example'; </s> add import { Example as TextArea } from './basic';
[ "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/8f28a61bec6baab429d8912303c18fe812579e42
src/components/primitives/Input/InputAdvanced.tsx
export default memo(forwardRef(InputAdvance));
<mask> </Box> <mask> ); <mask> }; <mask> <mask> export default React.memo(React.forwardRef(InputAdvance)); </s> fix: updated Input and textarea </s> remove export const InputLeftAddon = React.memo( React.forwardRef((props: IBoxProps & IInputProps, ref?: any) => { const addonsDefaultStyle = { p: 3, borderColor: useColorModeValue('gray.300', 'gray.600'), borderWidth: 1, }; return ( <Box {...addonsDefaultStyle} borderRightWidth={0} roundedLeft={4} bg={useColorModeValue('gray.50', 'gray.700')} {...props} ref={ref} > <Box m="auto" _text={props._text || { fontWeight: 600 }}> {props.children} </Box> </Box> ); }) ); export const InputRightAddon = React.memo( React.forwardRef((props: IBoxProps & IInputProps, ref?: any) => { const addonsDefaultStyle = { p: 3, borderColor: useColorModeValue('gray.300', 'gray.600'), borderWidth: 1, }; return ( <Box {...addonsDefaultStyle} borderLeftWidth={0} roundedRight={4} bg={useColorModeValue('gray.50', 'gray.700')} {...props} ref={ref} > <Box m="auto" _text={props._text || { fontWeight: 600 }}> {props.children} </Box> </Box> ); }) ); type InputGroupProps = IBoxProps & { children: JSX.Element | JSX.Element[]; variant?: string; size?: string; }; </s> add </s> remove export default React.memo(React.forwardRef(TextArea)); </s> add export default memo(forwardRef(TextArea)); </s> remove export default React.memo(React.forwardRef(InputBase)); </s> add export default memo(forwardRef(InputBase)); </s> remove export default React.memo(React.forwardRef(Input)); </s> add export default memo(forwardRef(Input)); </s> remove {Sizes.map((value: string) => { </s> add {Sizes.map((value) => {
[ "keep", "keep", "keep", "keep", "replace" ]
https://github.com/GeekyAnts/NativeBase/commit/8f28a61bec6baab429d8912303c18fe812579e42
src/components/primitives/Input/InputAdvanced.tsx
import React, { memo, forwardRef } from 'react';
<mask> import React from 'react'; <mask> import { TextInput, Platform } from 'react-native'; <mask> import styled from 'styled-components/native'; <mask> import { <mask> border, <mask> flex, </s> fix: updated Input and textarea </s> remove import type { TextInputProps, TextStyle } from 'react-native'; </s> add import type { TextInputProps } from 'react-native'; </s> remove import React from 'react'; import { default as Box, IBoxProps } from '../Box'; import type { IInputProps } from '../Input'; </s> add import React, { memo, forwardRef } from 'react'; import type { IInputGroupProps } from './types'; </s> remove import React from 'react'; </s> add import React, { memo, forwardRef } from 'react'; </s> remove import React from 'react'; </s> add import React, { memo, forwardRef } from 'react'; </s> remove import { Example as TextArea } from './example'; </s> add import { Example as TextArea } from './basic';
[ "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/8f28a61bec6baab429d8912303c18fe812579e42
src/components/primitives/Input/InputBase.tsx
export default memo(forwardRef(InputBase));
<mask> /> <mask> ); <mask> }; <mask> <mask> export default React.memo(React.forwardRef(InputBase)); </s> fix: updated Input and textarea </s> remove export default React.memo(React.forwardRef(TextArea)); </s> add export default memo(forwardRef(TextArea)); </s> remove export default React.memo(React.forwardRef(InputAdvance)); </s> add export default memo(forwardRef(InputAdvance)); </s> remove export default React.memo(React.forwardRef(Input)); </s> add export default memo(forwardRef(Input)); </s> remove const demoValueControlledTextArea = (e: any) => { </s> add const demoValueControlledTextArea = (e) => { </s> remove export const InputLeftAddon = React.memo( React.forwardRef((props: IBoxProps & IInputProps, ref?: any) => { const addonsDefaultStyle = { p: 3, borderColor: useColorModeValue('gray.300', 'gray.600'), borderWidth: 1, }; return ( <Box {...addonsDefaultStyle} borderRightWidth={0} roundedLeft={4} bg={useColorModeValue('gray.50', 'gray.700')} {...props} ref={ref} > <Box m="auto" _text={props._text || { fontWeight: 600 }}> {props.children} </Box> </Box> ); }) ); export const InputRightAddon = React.memo( React.forwardRef((props: IBoxProps & IInputProps, ref?: any) => { const addonsDefaultStyle = { p: 3, borderColor: useColorModeValue('gray.300', 'gray.600'), borderWidth: 1, }; return ( <Box {...addonsDefaultStyle} borderLeftWidth={0} roundedRight={4} bg={useColorModeValue('gray.50', 'gray.700')} {...props} ref={ref} > <Box m="auto" _text={props._text || { fontWeight: 600 }}> {props.children} </Box> </Box> ); }) ); type InputGroupProps = IBoxProps & { children: JSX.Element | JSX.Element[]; variant?: string; size?: string; }; </s> add
[ "keep", "keep", "keep", "keep", "replace" ]
https://github.com/GeekyAnts/NativeBase/commit/8f28a61bec6baab429d8912303c18fe812579e42
src/components/primitives/Input/InputBase.tsx
import React, { memo, forwardRef } from 'react'; import type { IInputGroupProps } from './types';
<mask> import React from 'react'; <mask> import { default as Box, IBoxProps } from '../Box'; <mask> import type { IInputProps } from '../Input'; <mask> import { getAttachedChildren } from '../../../utils'; <mask> import { useColorModeValue } from '../../../core/color-mode/hooks'; <mask> import Flex from '../Flex'; <mask> import { themeTools } from '../../../theme'; <mask> </s> fix: updated Input and textarea </s> remove import { useColorModeValue } from '../../../core/color-mode/hooks'; </s> add </s> remove import { Example as TextArea } from './example'; </s> add import { Example as TextArea } from './basic'; </s> remove import { DefaultInput, SizeInput, VariantInput, InputAddons, InputElements, PasswordInput, ControlledInput, FormControlled, } from './example'; </s> add import { Example as Basic } from './Basic'; import { Example as Size } from './Size'; import { Example as Variant } from './Variant'; import { Example as Addons } from './Addons'; import { Example as Elements } from './Elements'; import { Example as Masked } from './Masked'; import { Example as Controlled } from './Controlled'; import { Example as FormControlled } from './FormControlled'; </s> remove import React from 'react'; </s> add import React, { memo, forwardRef } from 'react'; </s> remove import React from 'react'; </s> add import React, { memo, forwardRef } from 'react';
[ "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/8f28a61bec6baab429d8912303c18fe812579e42
src/components/primitives/Input/InputGroup.tsx
<mask> import React from 'react'; <mask> import { default as Box, IBoxProps } from '../Box'; <mask> import type { IInputProps } from '../Input'; <mask> import { getAttachedChildren } from '../../../utils'; <mask> import { useColorModeValue } from '../../../core/color-mode/hooks'; <mask> import Flex from '../Flex'; <mask> import { themeTools } from '../../../theme'; <mask> <mask> export const InputLeftAddon = React.memo( <mask> React.forwardRef((props: IBoxProps & IInputProps, ref?: any) => { </s> fix: updated Input and textarea </s> remove import React from 'react'; import { default as Box, IBoxProps } from '../Box'; import type { IInputProps } from '../Input'; </s> add import React, { memo, forwardRef } from 'react'; import type { IInputGroupProps } from './types'; </s> remove export const InputLeftAddon = React.memo( React.forwardRef((props: IBoxProps & IInputProps, ref?: any) => { const addonsDefaultStyle = { p: 3, borderColor: useColorModeValue('gray.300', 'gray.600'), borderWidth: 1, }; return ( <Box {...addonsDefaultStyle} borderRightWidth={0} roundedLeft={4} bg={useColorModeValue('gray.50', 'gray.700')} {...props} ref={ref} > <Box m="auto" _text={props._text || { fontWeight: 600 }}> {props.children} </Box> </Box> ); }) ); export const InputRightAddon = React.memo( React.forwardRef((props: IBoxProps & IInputProps, ref?: any) => { const addonsDefaultStyle = { p: 3, borderColor: useColorModeValue('gray.300', 'gray.600'), borderWidth: 1, }; return ( <Box {...addonsDefaultStyle} borderLeftWidth={0} roundedRight={4} bg={useColorModeValue('gray.50', 'gray.700')} {...props} ref={ref} > <Box m="auto" _text={props._text || { fontWeight: 600 }}> {props.children} </Box> </Box> ); }) ); type InputGroupProps = IBoxProps & { children: JSX.Element | JSX.Element[]; variant?: string; size?: string; }; </s> add </s> remove import { DefaultInput, SizeInput, VariantInput, InputAddons, InputElements, PasswordInput, ControlledInput, FormControlled, } from './example'; </s> add import { Example as Basic } from './Basic'; import { Example as Size } from './Size'; import { Example as Variant } from './Variant'; import { Example as Addons } from './Addons'; import { Example as Elements } from './Elements'; import { Example as Masked } from './Masked'; import { Example as Controlled } from './Controlled'; import { Example as FormControlled } from './FormControlled'; </s> remove import React from 'react'; </s> add import React, { memo, forwardRef } from 'react'; </s> remove import { Example as TextArea } from './example'; </s> add import { Example as TextArea } from './basic';
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/8f28a61bec6baab429d8912303c18fe812579e42
src/components/primitives/Input/InputGroup.tsx
<mask> import { useColorModeValue } from '../../../core/color-mode/hooks'; <mask> import Flex from '../Flex'; <mask> import { themeTools } from '../../../theme'; <mask> <mask> export const InputLeftAddon = React.memo( <mask> React.forwardRef((props: IBoxProps & IInputProps, ref?: any) => { <mask> const addonsDefaultStyle = { <mask> p: 3, <mask> borderColor: useColorModeValue('gray.300', 'gray.600'), <mask> borderWidth: 1, <mask> }; <mask> return ( <mask> <Box <mask> {...addonsDefaultStyle} <mask> borderRightWidth={0} <mask> roundedLeft={4} <mask> bg={useColorModeValue('gray.50', 'gray.700')} <mask> {...props} <mask> ref={ref} <mask> > <mask> <Box m="auto" _text={props._text || { fontWeight: 600 }}> <mask> {props.children} <mask> </Box> <mask> </Box> <mask> ); <mask> }) <mask> ); <mask> export const InputRightAddon = React.memo( <mask> React.forwardRef((props: IBoxProps & IInputProps, ref?: any) => { <mask> const addonsDefaultStyle = { <mask> p: 3, <mask> borderColor: useColorModeValue('gray.300', 'gray.600'), <mask> borderWidth: 1, <mask> }; <mask> return ( <mask> <Box <mask> {...addonsDefaultStyle} <mask> borderLeftWidth={0} <mask> roundedRight={4} <mask> bg={useColorModeValue('gray.50', 'gray.700')} <mask> {...props} <mask> ref={ref} <mask> > <mask> <Box m="auto" _text={props._text || { fontWeight: 600 }}> <mask> {props.children} <mask> </Box> <mask> </Box> <mask> ); <mask> }) <mask> ); <mask> <mask> type InputGroupProps = IBoxProps & { <mask> children: JSX.Element | JSX.Element[]; <mask> variant?: string; <mask> size?: string; <mask> }; <mask> <mask> const supplyPropsToChildren = (children: any, props: any) => { <mask> return React.Children.map(children, (child: JSX.Element) => { <mask> return React.cloneElement(child, props, child.props.children); <mask> }); <mask> }; </s> fix: updated Input and textarea </s> remove import { useColorModeValue } from '../../../core/color-mode/hooks'; </s> add </s> remove }; </s> add } </s> remove export const InputGroup = React.memo( React.forwardRef(({ children, ...props }: InputGroupProps, ref: any) => { </s> add export const InputGroup = memo( forwardRef(({ children, ...props }: IInputGroupProps, ref: any) => { </s> remove const demoValueControlledTextArea = (e: any) => { </s> add const demoValueControlledTextArea = (e) => { </s> remove {Sizes.map((value: string) => { </s> add {Sizes.map((value) => {
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/8f28a61bec6baab429d8912303c18fe812579e42
src/components/primitives/Input/InputGroup.tsx
export const InputGroup = memo( forwardRef(({ children, ...props }: IInputGroupProps, ref: any) => {
<mask> return React.cloneElement(child, props, child.props.children); <mask> }); <mask> }; <mask> <mask> export const InputGroup = React.memo( <mask> React.forwardRef(({ children, ...props }: InputGroupProps, ref: any) => { <mask> let [layoutProps, remProps] = themeTools.extractInObject(props, [ <mask> 'w', <mask> 'width', <mask> 'm', <mask> 'mr', </s> fix: updated Input and textarea </s> remove export const InputLeftAddon = React.memo( React.forwardRef((props: IBoxProps & IInputProps, ref?: any) => { const addonsDefaultStyle = { p: 3, borderColor: useColorModeValue('gray.300', 'gray.600'), borderWidth: 1, }; return ( <Box {...addonsDefaultStyle} borderRightWidth={0} roundedLeft={4} bg={useColorModeValue('gray.50', 'gray.700')} {...props} ref={ref} > <Box m="auto" _text={props._text || { fontWeight: 600 }}> {props.children} </Box> </Box> ); }) ); export const InputRightAddon = React.memo( React.forwardRef((props: IBoxProps & IInputProps, ref?: any) => { const addonsDefaultStyle = { p: 3, borderColor: useColorModeValue('gray.300', 'gray.600'), borderWidth: 1, }; return ( <Box {...addonsDefaultStyle} borderLeftWidth={0} roundedRight={4} bg={useColorModeValue('gray.50', 'gray.700')} {...props} ref={ref} > <Box m="auto" _text={props._text || { fontWeight: 600 }}> {props.children} </Box> </Box> ); }) ); type InputGroupProps = IBoxProps & { children: JSX.Element | JSX.Element[]; variant?: string; size?: string; }; </s> add </s> remove }; </s> add } </s> remove export type ITextAreaProps = IInputProps & { </s> add export interface ITextAreaProps extends IInputProps { /** * Maps to react-native TextInput's numberOfLines. */ </s> remove const demoValueControlledTextArea = (e: any) => { </s> add const demoValueControlledTextArea = (e) => { </s> remove import { useColorModeValue } from '../../../core/color-mode/hooks'; </s> add
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/8f28a61bec6baab429d8912303c18fe812579e42
src/components/primitives/Input/InputGroup.tsx
import type { TextInputProps } from 'react-native';
<mask> import type { TextInputProps, TextStyle } from 'react-native'; <mask> import type { <mask> ColorProps, <mask> SpaceProps, <mask> FlexboxProps, <mask> BorderProps, </s> fix: updated Input and textarea </s> remove import React from 'react'; </s> add import React, { memo, forwardRef } from 'react'; </s> remove import React from 'react'; import { default as Box, IBoxProps } from '../Box'; import type { IInputProps } from '../Input'; </s> add import React, { memo, forwardRef } from 'react'; import type { IInputGroupProps } from './types'; </s> remove import React from 'react'; </s> add import React, { memo, forwardRef } from 'react'; </s> remove import { useColorModeValue } from '../../../core/color-mode/hooks'; </s> add
[ "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/8f28a61bec6baab429d8912303c18fe812579e42
src/components/primitives/Input/types.ts
import type { IBoxProps } from '../Box';
<mask> PlatformProps, <mask> TypographyProps, <mask> } from '../../types'; <mask> <mask> export interface IInputProps <mask> extends PlatformProps, <mask> ColorProps, <mask> Omit<TextInputProps, 'textAlign'>, </s> fix: updated Input and textarea </s> remove export type IInputProps = PlatformProps & ColorProps & TextInputProps & SpaceProps & LayoutProps & FlexboxProps & TypographyProps & BorderProps & ExtraProps & OutlineProps & ShadowProps & LayoutProps & TypographyProps & BackgroundProps & BorderProps & { style?: TextStyle; children?: string | JSX.Element[] | JSX.Element; placeholder?: string; isInvalid?: boolean; variant?: 'outline' | 'filled' | 'underlined' | 'unstyled' | 'rounded'; isDisabled?: boolean; size?: string; isRequired?: boolean; isReadOnly?: boolean; isFullWidth?: boolean; InputLeftElement?: JSX.Element | JSX.Element[]; InputRightElement?: JSX.Element | JSX.Element[]; type?: 'text' | 'password' | string; // Interaction Props _hover?: any; _focus?: any; _disabled?: any; _invalid?: any; wrapperRef?: any; // These porps are currently on hold // label?: string; // _label?: ITextProps; }; </s> add export interface IInputProps extends PlatformProps, ColorProps, Omit<TextInputProps, 'textAlign'>, SpaceProps, LayoutProps, FlexboxProps, TypographyProps, BorderProps, ExtraProps, OutlineProps, ShadowProps, LayoutProps, TypographyProps, BackgroundProps, BorderProps { /** * If true, the input will indicate an error. */ isInvalid?: boolean; /** * The variant of the input style to use. * @default <code>outline</code> */ variant?: 'outline' | 'filled' | 'underlined' | 'unstyled' | 'rounded'; /** * If true, the input will be disabled. */ isDisabled?: boolean; /** * The size of the input. * @default <code>md</code> */ size?: string; /** * */ isRequired?: boolean; /** * If true, prevents the value of the input from being edited. */ isReadOnly?: boolean; /** * If true, the input element will span the full width of its parent */ isFullWidth?: boolean; /** * If given, adds the provided element to the left of the input. */ InputLeftElement?: JSX.Element | JSX.Element[]; /** * If given, adds the provided element to the right of the input. */ InputRightElement?: JSX.Element | JSX.Element[]; /** * Using the type password, user can mask the input. */ type?: 'text' | 'password' | string; /** * Ref to be passed to Icon's wrapper Box */ wrapperRef?: any; // Interaction Props /** * Passed props will be applied on hovered state. */ _hover?: IInputProps; /** * Passed props will be applied on focused state. */ _focus?: IInputProps; /** * Passed props will be applied on disabled state. */ _disabled?: IInputProps; /** * Passed props will be applied on invalid state. */ _invalid?: IInputProps; // These porps are currently on hold // label?: string; // _label?: ITextProps; } export interface IInputGroupProps extends IBoxProps { /** * The variant of the input style to use. * @default <code>outline</code> */ variant?: string; /** * The size of the input. * @default <code>md</code> */ size?: string; } </s> remove export type ITextAreaProps = IInputProps & { </s> add export interface ITextAreaProps extends IInputProps { /** * Maps to react-native TextInput's numberOfLines. */ </s> remove * </s> add * Ref to be passed to Icon's wrapper Box </s> remove import type { TextInputProps, TextStyle } from 'react-native'; </s> add import type { TextInputProps } from 'react-native'; </s> remove import React from 'react'; </s> add import React, { memo, forwardRef } from 'react';
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/8f28a61bec6baab429d8912303c18fe812579e42
src/components/primitives/Input/types.ts
export interface IInputProps extends PlatformProps, ColorProps, Omit<TextInputProps, 'textAlign'>, SpaceProps, LayoutProps, FlexboxProps, TypographyProps, BorderProps, ExtraProps, OutlineProps, ShadowProps, LayoutProps, TypographyProps, BackgroundProps, BorderProps { /** * If true, the input will indicate an error. */ isInvalid?: boolean; /** * The variant of the input style to use. * @default <code>outline</code> */ variant?: 'outline' | 'filled' | 'underlined' | 'unstyled' | 'rounded'; /** * If true, the input will be disabled. */ isDisabled?: boolean; /** * The size of the input. * @default <code>md</code> */ size?: string; /** * */ isRequired?: boolean; /** * If true, prevents the value of the input from being edited. */ isReadOnly?: boolean; /** * If true, the input element will span the full width of its parent */ isFullWidth?: boolean; /** * If given, adds the provided element to the left of the input. */ InputLeftElement?: JSX.Element | JSX.Element[]; /** * If given, adds the provided element to the right of the input. */ InputRightElement?: JSX.Element | JSX.Element[]; /** * Using the type password, user can mask the input. */ type?: 'text' | 'password' | string; /** * Ref to be passed to Icon's wrapper Box */ wrapperRef?: any; // Interaction Props /** * Passed props will be applied on hovered state. */ _hover?: IInputProps; /** * Passed props will be applied on focused state. */ _focus?: IInputProps; /** * Passed props will be applied on disabled state. */ _disabled?: IInputProps; /** * Passed props will be applied on invalid state. */ _invalid?: IInputProps; // These porps are currently on hold // label?: string; // _label?: ITextProps; } export interface IInputGroupProps extends IBoxProps { /** * The variant of the input style to use. * @default <code>outline</code> */ variant?: string; /** * The size of the input. * @default <code>md</code> */ size?: string; }
<mask> PlatformProps, <mask> TypographyProps, <mask> } from '../../types'; <mask> <mask> export type IInputProps = PlatformProps & <mask> ColorProps & <mask> TextInputProps & <mask> SpaceProps & <mask> LayoutProps & <mask> FlexboxProps & <mask> TypographyProps & <mask> BorderProps & <mask> ExtraProps & <mask> OutlineProps & <mask> ShadowProps & <mask> LayoutProps & <mask> TypographyProps & <mask> BackgroundProps & <mask> BorderProps & { <mask> style?: TextStyle; <mask> children?: string | JSX.Element[] | JSX.Element; <mask> placeholder?: string; <mask> isInvalid?: boolean; <mask> variant?: 'outline' | 'filled' | 'underlined' | 'unstyled' | 'rounded'; <mask> isDisabled?: boolean; <mask> size?: string; <mask> isRequired?: boolean; <mask> isReadOnly?: boolean; <mask> isFullWidth?: boolean; <mask> InputLeftElement?: JSX.Element | JSX.Element[]; <mask> InputRightElement?: JSX.Element | JSX.Element[]; <mask> type?: 'text' | 'password' | string; <mask> // Interaction Props <mask> _hover?: any; <mask> _focus?: any; <mask> _disabled?: any; <mask> _invalid?: any; <mask> wrapperRef?: any; <mask> // These porps are currently on hold <mask> // label?: string; <mask> // _label?: ITextProps; <mask> }; </s> fix: updated Input and textarea </s> remove export const InputLeftAddon = React.memo( React.forwardRef((props: IBoxProps & IInputProps, ref?: any) => { const addonsDefaultStyle = { p: 3, borderColor: useColorModeValue('gray.300', 'gray.600'), borderWidth: 1, }; return ( <Box {...addonsDefaultStyle} borderRightWidth={0} roundedLeft={4} bg={useColorModeValue('gray.50', 'gray.700')} {...props} ref={ref} > <Box m="auto" _text={props._text || { fontWeight: 600 }}> {props.children} </Box> </Box> ); }) ); export const InputRightAddon = React.memo( React.forwardRef((props: IBoxProps & IInputProps, ref?: any) => { const addonsDefaultStyle = { p: 3, borderColor: useColorModeValue('gray.300', 'gray.600'), borderWidth: 1, }; return ( <Box {...addonsDefaultStyle} borderLeftWidth={0} roundedRight={4} bg={useColorModeValue('gray.50', 'gray.700')} {...props} ref={ref} > <Box m="auto" _text={props._text || { fontWeight: 600 }}> {props.children} </Box> </Box> ); }) ); type InputGroupProps = IBoxProps & { children: JSX.Element | JSX.Element[]; variant?: string; size?: string; }; </s> add </s> remove import React from 'react'; </s> add import React, { memo, forwardRef } from 'react'; </s> remove }; </s> add } </s> remove import { useColorModeValue } from '../../../core/color-mode/hooks'; </s> add </s> remove export type ITextAreaProps = IInputProps & { </s> add export interface ITextAreaProps extends IInputProps { /** * Maps to react-native TextInput's numberOfLines. */
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace" ]
https://github.com/GeekyAnts/NativeBase/commit/8f28a61bec6baab429d8912303c18fe812579e42
src/components/primitives/Input/types.ts
* Ref to be passed to Icon's wrapper Box
<mask> * If given, will use this icon instead of the default. <mask> */ <mask> icon?: JSX.Element; <mask> /** <mask> * <mask> */ <mask> wrapperRef?: any; <mask> } <mask> export interface IRadioGroupProps extends IBoxProps { <mask> /** </s> fix: updated Input and textarea </s> remove export type IInputProps = PlatformProps & ColorProps & TextInputProps & SpaceProps & LayoutProps & FlexboxProps & TypographyProps & BorderProps & ExtraProps & OutlineProps & ShadowProps & LayoutProps & TypographyProps & BackgroundProps & BorderProps & { style?: TextStyle; children?: string | JSX.Element[] | JSX.Element; placeholder?: string; isInvalid?: boolean; variant?: 'outline' | 'filled' | 'underlined' | 'unstyled' | 'rounded'; isDisabled?: boolean; size?: string; isRequired?: boolean; isReadOnly?: boolean; isFullWidth?: boolean; InputLeftElement?: JSX.Element | JSX.Element[]; InputRightElement?: JSX.Element | JSX.Element[]; type?: 'text' | 'password' | string; // Interaction Props _hover?: any; _focus?: any; _disabled?: any; _invalid?: any; wrapperRef?: any; // These porps are currently on hold // label?: string; // _label?: ITextProps; }; </s> add export interface IInputProps extends PlatformProps, ColorProps, Omit<TextInputProps, 'textAlign'>, SpaceProps, LayoutProps, FlexboxProps, TypographyProps, BorderProps, ExtraProps, OutlineProps, ShadowProps, LayoutProps, TypographyProps, BackgroundProps, BorderProps { /** * If true, the input will indicate an error. */ isInvalid?: boolean; /** * The variant of the input style to use. * @default <code>outline</code> */ variant?: 'outline' | 'filled' | 'underlined' | 'unstyled' | 'rounded'; /** * If true, the input will be disabled. */ isDisabled?: boolean; /** * The size of the input. * @default <code>md</code> */ size?: string; /** * */ isRequired?: boolean; /** * If true, prevents the value of the input from being edited. */ isReadOnly?: boolean; /** * If true, the input element will span the full width of its parent */ isFullWidth?: boolean; /** * If given, adds the provided element to the left of the input. */ InputLeftElement?: JSX.Element | JSX.Element[]; /** * If given, adds the provided element to the right of the input. */ InputRightElement?: JSX.Element | JSX.Element[]; /** * Using the type password, user can mask the input. */ type?: 'text' | 'password' | string; /** * Ref to be passed to Icon's wrapper Box */ wrapperRef?: any; // Interaction Props /** * Passed props will be applied on hovered state. */ _hover?: IInputProps; /** * Passed props will be applied on focused state. */ _focus?: IInputProps; /** * Passed props will be applied on disabled state. */ _disabled?: IInputProps; /** * Passed props will be applied on invalid state. */ _invalid?: IInputProps; // These porps are currently on hold // label?: string; // _label?: ITextProps; } export interface IInputGroupProps extends IBoxProps { /** * The variant of the input style to use. * @default <code>outline</code> */ variant?: string; /** * The size of the input. * @default <code>md</code> */ size?: string; } </s> remove export type ITextAreaProps = IInputProps & { </s> add export interface ITextAreaProps extends IInputProps { /** * Maps to react-native TextInput's numberOfLines. */ </s> remove import { useColorModeValue } from '../../../core/color-mode/hooks'; </s> add </s> remove export const InputLeftAddon = React.memo( React.forwardRef((props: IBoxProps & IInputProps, ref?: any) => { const addonsDefaultStyle = { p: 3, borderColor: useColorModeValue('gray.300', 'gray.600'), borderWidth: 1, }; return ( <Box {...addonsDefaultStyle} borderRightWidth={0} roundedLeft={4} bg={useColorModeValue('gray.50', 'gray.700')} {...props} ref={ref} > <Box m="auto" _text={props._text || { fontWeight: 600 }}> {props.children} </Box> </Box> ); }) ); export const InputRightAddon = React.memo( React.forwardRef((props: IBoxProps & IInputProps, ref?: any) => { const addonsDefaultStyle = { p: 3, borderColor: useColorModeValue('gray.300', 'gray.600'), borderWidth: 1, }; return ( <Box {...addonsDefaultStyle} borderLeftWidth={0} roundedRight={4} bg={useColorModeValue('gray.50', 'gray.700')} {...props} ref={ref} > <Box m="auto" _text={props._text || { fontWeight: 600 }}> {props.children} </Box> </Box> ); }) ); type InputGroupProps = IBoxProps & { children: JSX.Element | JSX.Element[]; variant?: string; size?: string; }; </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/8f28a61bec6baab429d8912303c18fe812579e42
src/components/primitives/Radio/types.tsx
import React, { memo, forwardRef } from 'react';
<mask> import React from 'react'; <mask> import { Input, IInputProps } from '../Input'; <mask> import { usePropsResolution } from '../../../hooks/useThemeProps'; <mask> export type ITextAreaProps = IInputProps & { <mask> totalLines?: number; <mask> }; </s> fix: updated Input and textarea </s> remove export type ITextAreaProps = IInputProps & { </s> add export interface ITextAreaProps extends IInputProps { /** * Maps to react-native TextInput's numberOfLines. */ </s> remove }; </s> add } </s> remove import React from 'react'; </s> add import React, { memo, forwardRef } from 'react'; </s> remove import { useColorModeValue } from '../../../core/color-mode/hooks'; </s> add </s> remove import React from 'react'; import { default as Box, IBoxProps } from '../Box'; import type { IInputProps } from '../Input'; </s> add import React, { memo, forwardRef } from 'react'; import type { IInputGroupProps } from './types';
[ "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/8f28a61bec6baab429d8912303c18fe812579e42
src/components/primitives/TextArea/index.tsx
export interface ITextAreaProps extends IInputProps { /** * Maps to react-native TextInput's numberOfLines. */
<mask> import React from 'react'; <mask> import { Input, IInputProps } from '../Input'; <mask> import { usePropsResolution } from '../../../hooks/useThemeProps'; <mask> export type ITextAreaProps = IInputProps & { <mask> totalLines?: number; <mask> }; <mask> <mask> const TextArea = ({ wrapperRef, ...props }: ITextAreaProps, ref: any) => { <mask> const { totalLines, ...newProps } = usePropsResolution('TextArea', props); </s> fix: updated Input and textarea </s> remove }; </s> add } </s> remove import React from 'react'; </s> add import React, { memo, forwardRef } from 'react'; </s> remove import { useColorModeValue } from '../../../core/color-mode/hooks'; </s> add </s> remove import React from 'react'; </s> add import React, { memo, forwardRef } from 'react'; </s> remove import React from 'react'; import { default as Box, IBoxProps } from '../Box'; import type { IInputProps } from '../Input'; </s> add import React, { memo, forwardRef } from 'react'; import type { IInputGroupProps } from './types';
[ "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/8f28a61bec6baab429d8912303c18fe812579e42
src/components/primitives/TextArea/index.tsx
}
<mask> import { Input, IInputProps } from '../Input'; <mask> import { usePropsResolution } from '../../../hooks/useThemeProps'; <mask> export type ITextAreaProps = IInputProps & { <mask> totalLines?: number; <mask> }; <mask> <mask> const TextArea = ({ wrapperRef, ...props }: ITextAreaProps, ref: any) => { <mask> const { totalLines, ...newProps } = usePropsResolution('TextArea', props); <mask> return ( <mask> <Input </s> fix: updated Input and textarea </s> remove export type ITextAreaProps = IInputProps & { </s> add export interface ITextAreaProps extends IInputProps { /** * Maps to react-native TextInput's numberOfLines. */ </s> remove import React from 'react'; </s> add import React, { memo, forwardRef } from 'react'; </s> remove import { useColorModeValue } from '../../../core/color-mode/hooks'; </s> add </s> remove export const InputGroup = React.memo( React.forwardRef(({ children, ...props }: InputGroupProps, ref: any) => { </s> add export const InputGroup = memo( forwardRef(({ children, ...props }: IInputGroupProps, ref: any) => { </s> remove export const InputLeftAddon = React.memo( React.forwardRef((props: IBoxProps & IInputProps, ref?: any) => { const addonsDefaultStyle = { p: 3, borderColor: useColorModeValue('gray.300', 'gray.600'), borderWidth: 1, }; return ( <Box {...addonsDefaultStyle} borderRightWidth={0} roundedLeft={4} bg={useColorModeValue('gray.50', 'gray.700')} {...props} ref={ref} > <Box m="auto" _text={props._text || { fontWeight: 600 }}> {props.children} </Box> </Box> ); }) ); export const InputRightAddon = React.memo( React.forwardRef((props: IBoxProps & IInputProps, ref?: any) => { const addonsDefaultStyle = { p: 3, borderColor: useColorModeValue('gray.300', 'gray.600'), borderWidth: 1, }; return ( <Box {...addonsDefaultStyle} borderLeftWidth={0} roundedRight={4} bg={useColorModeValue('gray.50', 'gray.700')} {...props} ref={ref} > <Box m="auto" _text={props._text || { fontWeight: 600 }}> {props.children} </Box> </Box> ); }) ); type InputGroupProps = IBoxProps & { children: JSX.Element | JSX.Element[]; variant?: string; size?: string; }; </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/8f28a61bec6baab429d8912303c18fe812579e42
src/components/primitives/TextArea/index.tsx
export default memo(forwardRef(TextArea));
<mask> /> <mask> ); <mask> }; <mask> <mask> export default React.memo(React.forwardRef(TextArea)); </s> fix: updated Input and textarea </s> remove export default React.memo(React.forwardRef(InputBase)); </s> add export default memo(forwardRef(InputBase)); </s> remove export default React.memo(React.forwardRef(InputAdvance)); </s> add export default memo(forwardRef(InputAdvance)); </s> remove export default React.memo(React.forwardRef(Input)); </s> add export default memo(forwardRef(Input)); </s> remove const demoValueControlledTextArea = (e: any) => { </s> add const demoValueControlledTextArea = (e) => { </s> remove export const InputLeftAddon = React.memo( React.forwardRef((props: IBoxProps & IInputProps, ref?: any) => { const addonsDefaultStyle = { p: 3, borderColor: useColorModeValue('gray.300', 'gray.600'), borderWidth: 1, }; return ( <Box {...addonsDefaultStyle} borderRightWidth={0} roundedLeft={4} bg={useColorModeValue('gray.50', 'gray.700')} {...props} ref={ref} > <Box m="auto" _text={props._text || { fontWeight: 600 }}> {props.children} </Box> </Box> ); }) ); export const InputRightAddon = React.memo( React.forwardRef((props: IBoxProps & IInputProps, ref?: any) => { const addonsDefaultStyle = { p: 3, borderColor: useColorModeValue('gray.300', 'gray.600'), borderWidth: 1, }; return ( <Box {...addonsDefaultStyle} borderLeftWidth={0} roundedRight={4} bg={useColorModeValue('gray.50', 'gray.700')} {...props} ref={ref} > <Box m="auto" _text={props._text || { fontWeight: 600 }}> {props.children} </Box> </Box> ); }) ); type InputGroupProps = IBoxProps & { children: JSX.Element | JSX.Element[]; variant?: string; size?: string; }; </s> add
[ "keep", "keep", "keep", "keep", "replace" ]
https://github.com/GeekyAnts/NativeBase/commit/8f28a61bec6baab429d8912303c18fe812579e42
src/components/primitives/TextArea/index.tsx
<AspectRatio ratio={9 / 10} height={400}>
<mask> import React from 'react'; <mask> import { AspectRatio, Image } from 'native-base'; <mask> export default function () { <mask> return ( <mask> <AspectRatio ratio={0.5} height={200}> <mask> <Image <mask> resizeMode="cover" <mask> source={{ <mask> uri: 'https://reactnative.dev/img/tiny_logo.png', <mask> }} </s> fix: example fiexes for checkbox, aspect ratio and circular progress </s> remove uri: 'https://reactnative.dev/img/tiny_logo.png', </s> add uri: 'https://images.pexels.com/photos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=3&h=750&w=1260', </s> remove import { CircularProgress, Heading, Center } from 'native-base'; </s> add import { CircularProgress, Heading, Center, Box, Text } from 'native-base'; </s> remove const [groupValue, setGroupValue] = React.useState(['Item 1 ', 'Item 3 ']); </s> add const [groupValue, setGroupValue] = React.useState(['Item 1', 'Item 3']); const getSelectedGroupValue = () => { if (groupValue.length === 0) return '[]'; let arrayString = groupValue.reduce( (accumulator, currentValue) => accumulator + ', ' + currentValue ); return '[' + arrayString + ']'; }; </s> remove <CircularProgress value={60} thickness={8} /> </s> add <CircularProgress value={60} thickness={2} /> </s> remove <CircularProgress mt={6} value={60} isIndeterminate> </s> add <CircularProgress mt={6} value={60} thickness={6} isIndeterminate>
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/912026ab09f03bec7953b01bbd3557edf36dd151
example/storybook/stories/components/composites/AspectRatio/EmbedImage.tsx
uri: 'https://images.pexels.com/photos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=3&h=750&w=1260',
<mask> <AspectRatio ratio={0.5} height={200}> <mask> <Image <mask> resizeMode="cover" <mask> source={{ <mask> uri: 'https://reactnative.dev/img/tiny_logo.png', <mask> }} <mask> alt="nativebase tiny logo" <mask> /> <mask> </AspectRatio> <mask> ); </s> fix: example fiexes for checkbox, aspect ratio and circular progress </s> remove <AspectRatio ratio={0.5} height={200}> </s> add <AspectRatio ratio={9 / 10} height={400}> </s> remove <Checkbox value="Item 1 "> </s> add <Checkbox value="Item 1" my={1}> </s> remove <CircularProgress value={60} thickness={8} /> </s> add <CircularProgress value={60} thickness={2} /> </s> remove <Icon name="home" mr={1} /> </s> add <Icon name="home" mr={1} size="xs" />
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/912026ab09f03bec7953b01bbd3557edf36dd151
example/storybook/stories/components/composites/AspectRatio/EmbedImage.tsx
<Icon name="home" mr={1} size="xs" />
<mask> <Breadcrumb spacing={2} fontSize="lg"> <mask> <Breadcrumb.Item> <mask> <Breadcrumb.Link> <mask> <HStack> <mask> <Icon name="home" mr={1} /> <mask> <Text>Home</Text> <mask> </HStack> <mask> </Breadcrumb.Link> <mask> </Breadcrumb.Item> <mask> <Breadcrumb.Item> </s> fix: example fiexes for checkbox, aspect ratio and circular progress </s> remove <Icon name="file-document" type="MaterialCommunityIcons" mr={1} /> </s> add <Icon name="file-document" type="MaterialCommunityIcons" mr={1} size="xs" /> </s> remove <Icon name="github" type="AntDesign" mr={1} /> </s> add <Icon name="github" type="AntDesign" mr={1} size="xs" /> </s> remove <Icon name="audiotrack" type="MaterialIcons" color="secondary.400" size={6} /> </s> add <Icon name="audiotrack" type="MaterialIcons" color="white" size={6} /> </s> remove <CircularProgress value={60} thickness={8} /> </s> add <CircularProgress value={60} thickness={2} />
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/912026ab09f03bec7953b01bbd3557edf36dd151
example/storybook/stories/components/composites/Breadcrumb/Composition.tsx
<Icon name="file-document" type="MaterialCommunityIcons" mr={1} size="xs" />
<mask> </Breadcrumb.Item> <mask> <Breadcrumb.Item> <mask> <Breadcrumb.Link href="https://alpha.nativebase.io/" isExternal> <mask> <HStack> <mask> <Icon name="file-document" type="MaterialCommunityIcons" mr={1} /> <mask> <Text>Docs</Text> <mask> </HStack> <mask> </Breadcrumb.Link> <mask> </Breadcrumb.Item> <mask> </s> fix: example fiexes for checkbox, aspect ratio and circular progress </s> remove <Icon name="home" mr={1} /> </s> add <Icon name="home" mr={1} size="xs" /> </s> remove <Icon name="github" type="AntDesign" mr={1} /> </s> add <Icon name="github" type="AntDesign" mr={1} size="xs" /> </s> remove <Icon name="audiotrack" type="MaterialIcons" color="secondary.400" size={6} /> </s> add <Icon name="audiotrack" type="MaterialIcons" color="white" size={6} /> </s> remove <CircularProgress value={60} thickness={8} /> </s> add <CircularProgress value={60} thickness={2} />
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/912026ab09f03bec7953b01bbd3557edf36dd151
example/storybook/stories/components/composites/Breadcrumb/Composition.tsx
<Icon name="github" type="AntDesign" mr={1} size="xs" />
<mask> href="https://github.com/GeekyAnts/nativebase" <mask> isExternal <mask> > <mask> <HStack> <mask> <Icon name="github" type="AntDesign" mr={1} /> <mask> <Text>Github (This is currently active)</Text> <mask> </HStack> <mask> </Breadcrumb.Link> <mask> </Breadcrumb.Item> <mask> </Breadcrumb> </s> fix: example fiexes for checkbox, aspect ratio and circular progress </s> remove <Icon name="file-document" type="MaterialCommunityIcons" mr={1} /> </s> add <Icon name="file-document" type="MaterialCommunityIcons" mr={1} size="xs" /> </s> remove <Icon name="home" mr={1} /> </s> add <Icon name="home" mr={1} size="xs" /> </s> remove <Icon name="audiotrack" type="MaterialIcons" color="secondary.400" size={6} /> </s> add <Icon name="audiotrack" type="MaterialIcons" color="white" size={6} /> </s> remove 550% </s> add 550 / 1000
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/912026ab09f03bec7953b01bbd3557edf36dd151
example/storybook/stories/components/composites/Breadcrumb/Composition.tsx
<Icon name="audiotrack" type="MaterialIcons" color="white" size={6} />
<mask> export default function () { <mask> return ( <mask> <HStack> <mask> <Center w="40px" h="40px" bg="primary.400" color="white"> <mask> <Icon <mask> name="audiotrack" <mask> type="MaterialIcons" <mask> color="secondary.400" <mask> size={6} <mask> /> <mask> </Center> <mask> <Center w="40px" h="40px" bg="secondary.400"> <mask> <Box _text={{ fontWeight: 'bold', fontSize: 'lg', color: 'white' }}> <mask> 20 <mask> </Box> </s> fix: example fiexes for checkbox, aspect ratio and circular progress </s> remove <CircularProgress value={60} thickness={8} /> </s> add <CircularProgress value={60} thickness={2} /> </s> remove <CircularProgress mt={6} value={60} isIndeterminate> </s> add <CircularProgress mt={6} value={60} thickness={6} isIndeterminate> </s> remove <AspectRatio ratio={0.5} height={200}> </s> add <AspectRatio ratio={9 / 10} height={400}> </s> remove import { CircularProgress, Heading, Center } from 'native-base'; </s> add import { CircularProgress, Heading, Center, Box, Text } from 'native-base';
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/912026ab09f03bec7953b01bbd3557edf36dd151
example/storybook/stories/components/composites/Center/WithIcons.tsx
<CircularProgress mt={6} value={60} thickness={6} isIndeterminate>
<mask> export default function () { <mask> return ( <mask> <Center> <mask> <Heading>Indeterminate Progress</Heading> <mask> <CircularProgress mt={6} value={60} isIndeterminate> <mask> 60% <mask> </CircularProgress> <mask> </Center> <mask> ); <mask> } </s> fix: example fiexes for checkbox, aspect ratio and circular progress </s> remove <CircularProgress value={60} thickness={8} /> </s> add <CircularProgress value={60} thickness={2} /> </s> remove import { CircularProgress, Heading, Center } from 'native-base'; </s> add import { CircularProgress, Heading, Center, Box, Text } from 'native-base'; </s> remove <AspectRatio ratio={0.5} height={200}> </s> add <AspectRatio ratio={9 / 10} height={400}> </s> remove <Icon name="audiotrack" type="MaterialIcons" color="secondary.400" size={6} /> </s> add <Icon name="audiotrack" type="MaterialIcons" color="white" size={6} /> </s> remove 550% </s> add 550 / 1000
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/912026ab09f03bec7953b01bbd3557edf36dd151
example/storybook/stories/components/composites/CircularProgress/Indeterminate.tsx
import { CircularProgress, Heading, Center, Box, Text } from 'native-base';
<mask> import React from 'react'; <mask> import { CircularProgress, Heading, Center } from 'native-base'; <mask> import { number } from '@storybook/addon-knobs'; <mask> export default function () { <mask> return ( <mask> <Center> <mask> <Heading mb={6}>Adding Min and Max</Heading> </s> fix: example fiexes for checkbox, aspect ratio and circular progress </s> remove <AspectRatio ratio={0.5} height={200}> </s> add <AspectRatio ratio={9 / 10} height={400}> </s> remove const [groupValue, setGroupValue] = React.useState(['Item 1 ', 'Item 3 ']); </s> add const [groupValue, setGroupValue] = React.useState(['Item 1', 'Item 3']); const getSelectedGroupValue = () => { if (groupValue.length === 0) return '[]'; let arrayString = groupValue.reduce( (accumulator, currentValue) => accumulator + ', ' + currentValue ); return '[' + arrayString + ']'; }; </s> remove <CircularProgress value={60} thickness={8} /> </s> add <CircularProgress value={60} thickness={2} /> </s> remove <CircularProgress mt={6} value={60} isIndeterminate> </s> add <CircularProgress mt={6} value={60} thickness={6} isIndeterminate> </s> remove <Icon name="audiotrack" type="MaterialIcons" color="secondary.400" size={6} /> </s> add <Icon name="audiotrack" type="MaterialIcons" color="white" size={6} />
[ "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/912026ab09f03bec7953b01bbd3557edf36dd151
example/storybook/stories/components/composites/CircularProgress/MinMax.tsx
550 / 1000
<mask> max={number('Max', 1000)} <mask> min={number('Min', 100)} <mask> size={100} <mask> > <mask> 550% <mask> </CircularProgress> <mask> </Center> <mask> ); <mask> } </s> fix: example fiexes for checkbox, aspect ratio and circular progress </s> remove <CircularProgress mt={6} value={60} isIndeterminate> </s> add <CircularProgress mt={6} value={60} thickness={6} isIndeterminate> </s> remove <CircularProgress value={60} thickness={8} /> </s> add <CircularProgress value={60} thickness={2} /> </s> remove value="Indeterminate Item " </s> add value="Indeterminate Item" my={1} </s> remove {groupValue} </s> add {getSelectedGroupValue()}
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/912026ab09f03bec7953b01bbd3557edf36dd151
example/storybook/stories/components/composites/CircularProgress/MinMax.tsx
<Box mt={5}> <Text>Min: 100</Text> <Text>Max: 1000</Text> </Box>
<mask> size={100} <mask> > <mask> 550 / 1000 <mask> </CircularProgress> <mask> </Center> <mask> ); <mask> } </s> fix: example fiexes for checkbox, aspect ratio and circular progress </s> remove 550% </s> add 550 / 1000 </s> remove <CircularProgress mt={6} value={60} isIndeterminate> </s> add <CircularProgress mt={6} value={60} thickness={6} isIndeterminate> </s> remove <CircularProgress value={60} thickness={8} /> </s> add <CircularProgress value={60} thickness={2} /> </s> remove <AspectRatio ratio={0.5} height={200}> </s> add <AspectRatio ratio={9 / 10} height={400}> </s> remove value="Indeterminate Item " </s> add value="Indeterminate Item" my={1}
[ "keep", "keep", "keep", "add", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/912026ab09f03bec7953b01bbd3557edf36dd151
example/storybook/stories/components/composites/CircularProgress/MinMax.tsx
<CircularProgress value={60} thickness={2} />
<mask> export default function () { <mask> return ( <mask> <Center> <mask> <Heading mb={6}>Changing the thickness</Heading> <mask> <CircularProgress value={60} thickness={8} /> <mask> </Center> <mask> ); <mask> } </s> fix: example fiexes for checkbox, aspect ratio and circular progress </s> remove <CircularProgress mt={6} value={60} isIndeterminate> </s> add <CircularProgress mt={6} value={60} thickness={6} isIndeterminate> </s> remove import { CircularProgress, Heading, Center } from 'native-base'; </s> add import { CircularProgress, Heading, Center, Box, Text } from 'native-base'; </s> remove <Icon name="audiotrack" type="MaterialIcons" color="secondary.400" size={6} /> </s> add <Icon name="audiotrack" type="MaterialIcons" color="white" size={6} /> </s> remove <AspectRatio ratio={0.5} height={200}> </s> add <AspectRatio ratio={9 / 10} height={400}> </s> remove const [groupValue, setGroupValue] = React.useState(['Item 1 ', 'Item 3 ']); </s> add const [groupValue, setGroupValue] = React.useState(['Item 1', 'Item 3']); const getSelectedGroupValue = () => { if (groupValue.length === 0) return '[]'; let arrayString = groupValue.reduce( (accumulator, currentValue) => accumulator + ', ' + currentValue ); return '[' + arrayString + ']'; };
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/912026ab09f03bec7953b01bbd3557edf36dd151
example/storybook/stories/components/composites/CircularProgress/Thickness.tsx
height={32}
<mask> uri: <mask> 'https://static.nike.com/a/images/f_auto/dpr_2.0/w_1328,c_limit/b56d1e9b-3861-4c89-995d-b8fb6240a762/nike-just-do-it.jpg', <mask> }} <mask> alt="Shoes" <mask> /> <mask> </Box> <mask> <Stack p={3} space={2} minW={32}> <mask> <Text fontSize="xs" color="red.400" fontWeight="semibold"> </s> fix: example fiexes for checkbox, aspect ratio and circular progress </s> remove uri: 'https://reactnative.dev/img/tiny_logo.png', </s> add uri: 'https://images.pexels.com/photos/60597/dahlia-red-blossom-bloom-60597.jpeg?auto=compress&cs=tinysrgb&dpr=3&h=750&w=1260', </s> remove <AspectRatio ratio={0.5} height={200}> </s> add <AspectRatio ratio={9 / 10} height={400}> </s> remove <Checkbox value="Item 1 "> </s> add <Checkbox value="Item 1" my={1}> </s> remove <Icon name="audiotrack" type="MaterialIcons" color="secondary.400" size={6} /> </s> add <Icon name="audiotrack" type="MaterialIcons" color="white" size={6} />
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/912026ab09f03bec7953b01bbd3557edf36dd151
example/storybook/stories/components/primitives/Box/composition-shoes-card.tsx
const [groupValue, setGroupValue] = React.useState(['Item 1', 'Item 3']); const getSelectedGroupValue = () => { if (groupValue.length === 0) return '[]'; let arrayString = groupValue.reduce( (accumulator, currentValue) => accumulator + ', ' + currentValue ); return '[' + arrayString + ']'; };
<mask> import React from 'react'; <mask> import { FormControl, Checkbox, VStack, Text, Container } from 'native-base'; <mask> <mask> export default function () { <mask> const [groupValue, setGroupValue] = React.useState(['Item 1 ', 'Item 3 ']); <mask> return ( <mask> <Container> <mask> <FormControl isRequired isInvalid> <mask> <FormControl.Label>Select Item</FormControl.Label> <mask> <Checkbox.Group </s> fix: example fiexes for checkbox, aspect ratio and circular progress </s> remove import { CircularProgress, Heading, Center } from 'native-base'; </s> add import { CircularProgress, Heading, Center, Box, Text } from 'native-base'; </s> remove <AspectRatio ratio={0.5} height={200}> </s> add <AspectRatio ratio={9 / 10} height={400}> </s> remove <CircularProgress value={60} thickness={8} /> </s> add <CircularProgress value={60} thickness={2} /> </s> remove <CircularProgress mt={6} value={60} isIndeterminate> </s> add <CircularProgress mt={6} value={60} thickness={6} isIndeterminate> </s> remove <Icon name="audiotrack" type="MaterialIcons" color="secondary.400" size={6} /> </s> add <Icon name="audiotrack" type="MaterialIcons" color="white" size={6} />
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/912026ab09f03bec7953b01bbd3557edf36dd151
example/storybook/stories/components/primitives/Checkbox/FormControlled.tsx
<Checkbox value="Item 1" my={1}>
<mask> setGroupValue(values || []); <mask> }} <mask> alignItems="flex-start" <mask> > <mask> <Checkbox value="Item 1 "> <mask> <Text mx={2}>Item 1</Text> <mask> </Checkbox> <mask> <Checkbox value="Item 2 "> <mask> <Text mx={2}>Item 2</Text> <mask> </Checkbox> </s> fix: example fiexes for checkbox, aspect ratio and circular progress </s> remove <Checkbox value="Item 2 "> </s> add <Checkbox value="Item 2" my={1}> </s> remove <Checkbox value="Item 3 "> </s> add <Checkbox value="Item 3" my={1}> </s> remove value="Indeterminate Item " </s> add value="Indeterminate Item" my={1} </s> remove {groupValue} </s> add {getSelectedGroupValue()}
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/912026ab09f03bec7953b01bbd3557edf36dd151
example/storybook/stories/components/primitives/Checkbox/FormControlled.tsx
<Checkbox value="Item 2" my={1}>
<mask> > <mask> <Checkbox value="Item 1 "> <mask> <Text mx={2}>Item 1</Text> <mask> </Checkbox> <mask> <Checkbox value="Item 2 "> <mask> <Text mx={2}>Item 2</Text> <mask> </Checkbox> <mask> <Checkbox value="Item 3 "> <mask> <Text mx={2}>Item 3</Text> <mask> </Checkbox> </s> fix: example fiexes for checkbox, aspect ratio and circular progress </s> remove <Checkbox value="Item 3 "> </s> add <Checkbox value="Item 3" my={1}> </s> remove <Checkbox value="Item 1 "> </s> add <Checkbox value="Item 1" my={1}> </s> remove value="Indeterminate Item " </s> add value="Indeterminate Item" my={1} </s> remove {groupValue} </s> add {getSelectedGroupValue()}
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/912026ab09f03bec7953b01bbd3557edf36dd151
example/storybook/stories/components/primitives/Checkbox/FormControlled.tsx
<Checkbox value="Item 3" my={1}>
<mask> </Checkbox> <mask> <Checkbox value="Item 2 "> <mask> <Text mx={2}>Item 2</Text> <mask> </Checkbox> <mask> <Checkbox value="Item 3 "> <mask> <Text mx={2}>Item 3</Text> <mask> </Checkbox> <mask> <Checkbox <mask> colorScheme="orange" <mask> isIndeterminate </s> fix: example fiexes for checkbox, aspect ratio and circular progress </s> remove <Checkbox value="Item 2 "> </s> add <Checkbox value="Item 2" my={1}> </s> remove <Checkbox value="Item 1 "> </s> add <Checkbox value="Item 1" my={1}> </s> remove value="Indeterminate Item " </s> add value="Indeterminate Item" my={1} </s> remove {groupValue} </s> add {getSelectedGroupValue()}
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/912026ab09f03bec7953b01bbd3557edf36dd151
example/storybook/stories/components/primitives/Checkbox/FormControlled.tsx
value="Indeterminate Item" my={1}
<mask> </Checkbox> <mask> <Checkbox <mask> colorScheme="orange" <mask> isIndeterminate <mask> value="Indeterminate Item " <mask> > <mask> <Text mx={2}>Indeterminate Item</Text> <mask> </Checkbox> <mask> </Checkbox.Group> <mask> <FormControl.HelperText> </s> fix: example fiexes for checkbox, aspect ratio and circular progress </s> remove <Checkbox value="Item 3 "> </s> add <Checkbox value="Item 3" my={1}> </s> remove <Checkbox value="Item 2 "> </s> add <Checkbox value="Item 2" my={1}> </s> remove <Checkbox value="Item 1 "> </s> add <Checkbox value="Item 1" my={1}> </s> remove {groupValue} </s> add {getSelectedGroupValue()} </s> remove 550% </s> add 550 / 1000
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/912026ab09f03bec7953b01bbd3557edf36dd151
example/storybook/stories/components/primitives/Checkbox/FormControlled.tsx
{getSelectedGroupValue()}
<mask> <mask> <VStack mt={3} alignItems="baseline"> <mask> <Text fontSize="md">Selected Values: </Text> <mask> <Text fontSize="md" bold> <mask> {groupValue} <mask> </Text> <mask> </VStack> <mask> </Container> <mask> ); <mask> } </s> fix: example fiexes for checkbox, aspect ratio and circular progress </s> remove <Checkbox value="Item 2 "> </s> add <Checkbox value="Item 2" my={1}> </s> remove <Checkbox value="Item 3 "> </s> add <Checkbox value="Item 3" my={1}> </s> remove <Checkbox value="Item 1 "> </s> add <Checkbox value="Item 1" my={1}> </s> remove value="Indeterminate Item " </s> add value="Indeterminate Item" my={1}
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/912026ab09f03bec7953b01bbd3557edf36dd151
example/storybook/stories/components/primitives/Checkbox/FormControlled.tsx
if (props.dataArray && props.renderRow) { const ds = new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 }); this.state = { dataSource: ds.cloneWithRows(props.dataArray) } } else { this.state = {}
<mask> class List extends Component { <mask> <mask> constructor(props) { <mask> super(props); <mask> const ds = new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 }); <mask> this.state = { <mask> dataSource: ds.cloneWithRows(this.props.dataArray) <mask> } <mask> } <mask> componentWillReceiveProps(nextProps) { <mask> const ds = new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 }); <mask> this.setState({ </s> fixup! List implementation fix #601 </s> remove if (this.props.dataArray && this.props.renderRow) { </s> add if (this.state.dataSource) { </s> remove const ds = new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 }); this.setState({ dataSource: ds.cloneWithRows(nextProps.dataArray) }); </s> add if (this.state.dataSource) { this.setState({ dataSource: this.state.dataSource.cloneWithRows(nextProps.dataArray) }); }
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/9125606f676ca8b08e26b8010eb90f95e648d424
src/basic/List.js
if (this.state.dataSource) { this.setState({ dataSource: this.state.dataSource.cloneWithRows(nextProps.dataArray) }); }
<mask> dataSource: ds.cloneWithRows(this.props.dataArray) <mask> } <mask> } <mask> componentWillReceiveProps(nextProps) { <mask> const ds = new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 }); <mask> this.setState({ <mask> dataSource: ds.cloneWithRows(nextProps.dataArray) <mask> }); <mask> } <mask> renderChildren() { <mask> const childrenArray = React.Children.map(this.props.children, child => child); <mask> <mask> return childrenArray; </s> fixup! List implementation fix #601 </s> remove if (this.props.dataArray && this.props.renderRow) { </s> add if (this.state.dataSource) { </s> remove const ds = new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 }); this.state = { dataSource: ds.cloneWithRows(this.props.dataArray) </s> add if (props.dataArray && props.renderRow) { const ds = new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 }); this.state = { dataSource: ds.cloneWithRows(props.dataArray) } } else { this.state = {}
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/9125606f676ca8b08e26b8010eb90f95e648d424
src/basic/List.js
if (this.state.dataSource) {
<mask> return childrenArray; <mask> } <mask> <mask> render() { <mask> if (this.props.dataArray && this.props.renderRow) { <mask> return ( <mask> <ListView <mask> {...this.props} <mask> enableEmptySections <mask> dataSource={this.state.dataSource} </s> fixup! List implementation fix #601 </s> remove const ds = new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 }); this.state = { dataSource: ds.cloneWithRows(this.props.dataArray) </s> add if (props.dataArray && props.renderRow) { const ds = new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 }); this.state = { dataSource: ds.cloneWithRows(props.dataArray) } } else { this.state = {} </s> remove const ds = new ListView.DataSource({ rowHasChanged: (r1, r2) => r1 !== r2 }); this.setState({ dataSource: ds.cloneWithRows(nextProps.dataArray) }); </s> add if (this.state.dataSource) { this.setState({ dataSource: this.state.dataSource.cloneWithRows(nextProps.dataArray) }); }
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/9125606f676ca8b08e26b8010eb90f95e648d424
src/basic/List.js
{getIndexedChildren(children)}
<mask> }; <mask> return ( <mask> <AccordionContext.Provider value={{ index: index, changeHandler }}> <mask> <Box {...newProps} ref={ref}> <mask> {getIndexedChildren(children, 'AccordionItem')} <mask> </Box> <mask> </AccordionContext.Provider> <mask> ); <mask> }; <mask> </s> fix: removed child component name check </s> remove {getIndexedChildren(children, 'Tab')} </s> add {getIndexedChildren(children)} </s> remove if (child.type.type.name === indexComponent) { counter++; return React.cloneElement( child, { index: counter, }, child.props.children ); } else { return child; } </s> add counter++; return React.cloneElement( child, { index: counter, }, child.props.children ); </s> remove return <Box {...props}>{getIndexedChildren(children, 'TabView')}</Box>; </s> add return <Box {...props}>{getIndexedChildren(children)}</Box>; </s> remove let numberInputStepper: JSX.Element | null = null; const separatingNumberInputStepper = (allChildren: any) => { return React.Children.map(allChildren, (child: JSX.Element) => { if (child.type.type.name === 'NumberInputStepper') { numberInputStepper = child; return null; } else { return child; } }); }; const updatedChildren = separatingNumberInputStepper(children); </s> add </s> remove if (child.type.type.name !== 'PinInputFiled') return child; else { pinInputFiledCounter++; return React.cloneElement( child, { fieldIndex: pinInputFiledCounter, }, child.props.children ); } </s> add pinInputFiledCounter++; return React.cloneElement( child, { fieldIndex: pinInputFiledCounter, }, child.props.children );
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/91d32fc90808f11d914a6722dbb653b3136ffd55
src/components/composites/Accordion/Accordion.tsx
const [numberInputStepper, setNumberInputStepper] = React.useState(null);
<mask> const [numberInputValue, setNumberInputValue] = React.useState( <mask> parseInt(value || defaultValue, 10) <mask> ); <mask> const handleChange = (newValue: number) => { <mask> const temp = newValue; <mask> setNumberInputValue(temp); <mask> if (keepWithinRange) { <mask> if (newValue < min) setNumberInputValue(min); <mask> else if (newValue > max) setNumberInputValue(max); </s> fix: removed child component name check </s> remove let numberInputStepper: JSX.Element | null = null; const separatingNumberInputStepper = (allChildren: any) => { return React.Children.map(allChildren, (child: JSX.Element) => { if (child.type.type.name === 'NumberInputStepper') { numberInputStepper = child; return null; } else { return child; } }); }; const updatedChildren = separatingNumberInputStepper(children); </s> add </s> remove if (child.type.type.name === indexComponent) { counter++; return React.cloneElement( child, { index: counter, }, child.props.children ); } else { return child; } </s> add counter++; return React.cloneElement( child, { index: counter, }, child.props.children ); </s> remove if (child.type.type.name !== 'PinInputFiled') return child; else { pinInputFiledCounter++; return React.cloneElement( child, { fieldIndex: pinInputFiledCounter, }, child.props.children ); } </s> add pinInputFiledCounter++; return React.cloneElement( child, { fieldIndex: pinInputFiledCounter, }, child.props.children ); </s> remove export default ( children: React.ReactNode, indexComponent: string, startingIndex?: number ) => { let counter = startingIndex ?? -1; </s> add export default (children: React.ReactNode, startingIndex?: number) => { let counter = startingIndex ? startingIndex - 1 : -1; </s> remove return <VStack {...props}>{children}</VStack>; </s> add const { setNumberInputStepper }: INumberInputContext = React.useContext( NumberInputContext ); React.useEffect(() => { setNumberInputStepper(<VStack {...props}>{children}</VStack>); }, [setNumberInputStepper, props, children]); return null;
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/91d32fc90808f11d914a6722dbb653b3136ffd55
src/components/composites/NumberInput/NumberInput.tsx
<mask> const handleChangeWithoutCheck = (newValue: number) => { <mask> const temp = newValue; <mask> setNumberInputValue(temp); <mask> }; <mask> let numberInputStepper: JSX.Element | null = null; <mask> <mask> const separatingNumberInputStepper = (allChildren: any) => { <mask> return React.Children.map(allChildren, (child: JSX.Element) => { <mask> if (child.type.type.name === 'NumberInputStepper') { <mask> numberInputStepper = child; <mask> return null; <mask> } else { <mask> return child; <mask> } <mask> }); <mask> }; <mask> const updatedChildren = separatingNumberInputStepper(children); <mask> <mask> return ( <mask> <NumberInputContext.Provider <mask> value={{ <mask> ...formControlContext, <mask> ...newProps, </s> fix: removed child component name check </s> remove if (child.type.type.name !== 'PinInputFiled') return child; else { pinInputFiledCounter++; return React.cloneElement( child, { fieldIndex: pinInputFiledCounter, }, child.props.children ); } </s> add pinInputFiledCounter++; return React.cloneElement( child, { fieldIndex: pinInputFiledCounter, }, child.props.children ); </s> remove if (child.type.type.name === indexComponent) { counter++; return React.cloneElement( child, { index: counter, }, child.props.children ); } else { return child; } </s> add counter++; return React.cloneElement( child, { index: counter, }, child.props.children ); </s> remove return <VStack {...props}>{children}</VStack>; </s> add const { setNumberInputStepper }: INumberInputContext = React.useContext( NumberInputContext ); React.useEffect(() => { setNumberInputStepper(<VStack {...props}>{children}</VStack>); }, [setNumberInputStepper, props, children]); return null; </s> remove export default ( children: React.ReactNode, indexComponent: string, startingIndex?: number ) => { let counter = startingIndex ?? -1; </s> add export default (children: React.ReactNode, startingIndex?: number) => { let counter = startingIndex ? startingIndex - 1 : -1;
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/91d32fc90808f11d914a6722dbb653b3136ffd55
src/components/composites/NumberInput/NumberInput.tsx
setNumberInputStepper,
<mask> numberInputValue, <mask> numberInputStepper, <mask> }} <mask> > <mask> {children} <mask> </NumberInputContext.Provider> </s> fix: removed child component name check </s> remove {updatedChildren} </s> add {children} </s> remove {getIndexedChildren(children, 'Tab')} </s> add {getIndexedChildren(children)} </s> remove if (child.type.type.name === indexComponent) { counter++; return React.cloneElement( child, { index: counter, }, child.props.children ); } else { return child; } </s> add counter++; return React.cloneElement( child, { index: counter, }, child.props.children ); </s> remove export default ( children: React.ReactNode, indexComponent: string, startingIndex?: number ) => { let counter = startingIndex ?? -1; </s> add export default (children: React.ReactNode, startingIndex?: number) => { let counter = startingIndex ? startingIndex - 1 : -1;
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/91d32fc90808f11d914a6722dbb653b3136ffd55
src/components/composites/NumberInput/NumberInput.tsx
{children}
<mask> numberInputValue, <mask> numberInputStepper, <mask> }} <mask> > <mask> {updatedChildren} <mask> </NumberInputContext.Provider> <mask> ); <mask> }; <mask> <mask> export default React.memo(NumberInput); </s> fix: removed child component name check </s> remove {getIndexedChildren(children, 'Tab')} </s> add {getIndexedChildren(children)} </s> remove {getIndexedChildren(children, 'AccordionItem')} </s> add {getIndexedChildren(children)} </s> remove return <VStack {...props}>{children}</VStack>; </s> add const { setNumberInputStepper }: INumberInputContext = React.useContext( NumberInputContext ); React.useEffect(() => { setNumberInputStepper(<VStack {...props}>{children}</VStack>); }, [setNumberInputStepper, props, children]); return null;
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/91d32fc90808f11d914a6722dbb653b3136ffd55
src/components/composites/NumberInput/NumberInput.tsx
import type { INumberInputSteppersProps, INumberInputContext } from './types'; import { NumberInputContext } from './Context';
<mask> import React from 'react'; <mask> import { TouchableOpacity, Platform } from 'react-native'; <mask> import { VStack, Box, Icon } from '../../primitives'; <mask> import { useThemeProps } from '../../../hooks'; <mask> import type { INumberInputSteppersProps } from './types'; <mask> <mask> export const NBStepper = ({ children, ...props }: any) => { <mask> const { <mask> style, <mask> isIncrement, </s> fix: removed child component name check </s> remove return <Box {...props}>{getIndexedChildren(children, 'TabView')}</Box>; </s> add return <Box {...props}>{getIndexedChildren(children)}</Box>; </s> remove export default ( children: React.ReactNode, indexComponent: string, startingIndex?: number ) => { let counter = startingIndex ?? -1; </s> add export default (children: React.ReactNode, startingIndex?: number) => { let counter = startingIndex ? startingIndex - 1 : -1; </s> remove return <VStack {...props}>{children}</VStack>; </s> add const { setNumberInputStepper }: INumberInputContext = React.useContext( NumberInputContext ); React.useEffect(() => { setNumberInputStepper(<VStack {...props}>{children}</VStack>); }, [setNumberInputStepper, props, children]); return null; </s> remove let numberInputStepper: JSX.Element | null = null; const separatingNumberInputStepper = (allChildren: any) => { return React.Children.map(allChildren, (child: JSX.Element) => { if (child.type.type.name === 'NumberInputStepper') { numberInputStepper = child; return null; } else { return child; } }); }; const updatedChildren = separatingNumberInputStepper(children); </s> add </s> remove if (child.type.type.name === indexComponent) { counter++; return React.cloneElement( child, { index: counter, }, child.props.children ); } else { return child; } </s> add counter++; return React.cloneElement( child, { index: counter, }, child.props.children );
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/91d32fc90808f11d914a6722dbb653b3136ffd55
src/components/composites/NumberInput/NumberInputStepper.tsx
const { setNumberInputStepper }: INumberInputContext = React.useContext( NumberInputContext ); React.useEffect(() => { setNumberInputStepper(<VStack {...props}>{children}</VStack>); }, [setNumberInputStepper, props, children]); return null;
<mask> const NumberInputStepper = ({ <mask> children, <mask> ...props <mask> }: INumberInputSteppersProps) => { <mask> return <VStack {...props}>{children}</VStack>; <mask> }; <mask> <mask> export default React.memo(NumberInputStepper); </s> fix: removed child component name check </s> remove return <Box {...props}>{getIndexedChildren(children, 'TabView')}</Box>; </s> add return <Box {...props}>{getIndexedChildren(children)}</Box>; </s> remove import type { INumberInputSteppersProps } from './types'; </s> add import type { INumberInputSteppersProps, INumberInputContext } from './types'; import { NumberInputContext } from './Context'; </s> remove let numberInputStepper: JSX.Element | null = null; const separatingNumberInputStepper = (allChildren: any) => { return React.Children.map(allChildren, (child: JSX.Element) => { if (child.type.type.name === 'NumberInputStepper') { numberInputStepper = child; return null; } else { return child; } }); }; const updatedChildren = separatingNumberInputStepper(children); </s> add </s> remove if (child.type.type.name !== 'PinInputFiled') return child; else { pinInputFiledCounter++; return React.cloneElement( child, { fieldIndex: pinInputFiledCounter, }, child.props.children ); } </s> add pinInputFiledCounter++; return React.cloneElement( child, { fieldIndex: pinInputFiledCounter, }, child.props.children ); </s> remove if (child.type.type.name === indexComponent) { counter++; return React.cloneElement( child, { index: counter, }, child.props.children ); } else { return child; } </s> add counter++; return React.cloneElement( child, { index: counter, }, child.props.children );
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/91d32fc90808f11d914a6722dbb653b3136ffd55
src/components/composites/NumberInput/NumberInputStepper.tsx
pinInputFiledCounter++; return React.cloneElement( child, { fieldIndex: pinInputFiledCounter, }, child.props.children );
<mask> <mask> const indexSetter = (allChildren: JSX.Element | JSX.Element[]) => { <mask> let pinInputFiledCounter = -1; <mask> return React.Children.map(allChildren, (child: JSX.Element) => { <mask> if (child.type.type.name !== 'PinInputFiled') return child; <mask> else { <mask> pinInputFiledCounter++; <mask> return React.cloneElement( <mask> child, <mask> { <mask> fieldIndex: pinInputFiledCounter, <mask> }, <mask> child.props.children <mask> ); <mask> } <mask> }); <mask> }; <mask> <mask> return ( <mask> <PinInputContext.Provider </s> fix: removed child component name check </s> remove let numberInputStepper: JSX.Element | null = null; const separatingNumberInputStepper = (allChildren: any) => { return React.Children.map(allChildren, (child: JSX.Element) => { if (child.type.type.name === 'NumberInputStepper') { numberInputStepper = child; return null; } else { return child; } }); }; const updatedChildren = separatingNumberInputStepper(children); </s> add </s> remove if (child.type.type.name === indexComponent) { counter++; return React.cloneElement( child, { index: counter, }, child.props.children ); } else { return child; } </s> add counter++; return React.cloneElement( child, { index: counter, }, child.props.children ); </s> remove export default ( children: React.ReactNode, indexComponent: string, startingIndex?: number ) => { let counter = startingIndex ?? -1; </s> add export default (children: React.ReactNode, startingIndex?: number) => { let counter = startingIndex ? startingIndex - 1 : -1; </s> remove return <VStack {...props}>{children}</VStack>; </s> add const { setNumberInputStepper }: INumberInputContext = React.useContext( NumberInputContext ); React.useEffect(() => { setNumberInputStepper(<VStack {...props}>{children}</VStack>); }, [setNumberInputStepper, props, children]); return null; </s> remove return <Box {...props}>{getIndexedChildren(children, 'TabView')}</Box>; </s> add return <Box {...props}>{getIndexedChildren(children)}</Box>;
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/91d32fc90808f11d914a6722dbb653b3136ffd55
src/components/composites/PinInput/PinInput.tsx
{getIndexedChildren(children)}
<mask> justifyContent={isFitted ? 'space-between' : align} <mask> {...tabBarStyle} <mask> {...props} <mask> > <mask> {getIndexedChildren(children, 'Tab')} <mask> </Box> <mask> ); <mask> }; <mask> <mask> export default React.memo(TabBar); </s> fix: removed child component name check </s> remove {getIndexedChildren(children, 'AccordionItem')} </s> add {getIndexedChildren(children)} </s> remove export default ( children: React.ReactNode, indexComponent: string, startingIndex?: number ) => { let counter = startingIndex ?? -1; </s> add export default (children: React.ReactNode, startingIndex?: number) => { let counter = startingIndex ? startingIndex - 1 : -1; </s> remove {updatedChildren} </s> add {children} </s> remove return <VStack {...props}>{children}</VStack>; </s> add const { setNumberInputStepper }: INumberInputContext = React.useContext( NumberInputContext ); React.useEffect(() => { setNumberInputStepper(<VStack {...props}>{children}</VStack>); }, [setNumberInputStepper, props, children]); return null;
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/91d32fc90808f11d914a6722dbb653b3136ffd55
src/components/composites/Tabs/TabBar.tsx
return <Box {...props}>{getIndexedChildren(children)}</Box>;
<mask> import getIndexedChildren from '../../../utils/getIndexedChildren'; <mask> import type { ITabViewsProps } from './types'; <mask> <mask> const TabViews = ({ children, ...props }: ITabViewsProps) => { <mask> return <Box {...props}>{getIndexedChildren(children, 'TabView')}</Box>; <mask> }; <mask> <mask> export default React.memo(TabViews); </s> fix: removed child component name check </s> remove import type { INumberInputSteppersProps } from './types'; </s> add import type { INumberInputSteppersProps, INumberInputContext } from './types'; import { NumberInputContext } from './Context'; </s> remove return <VStack {...props}>{children}</VStack>; </s> add const { setNumberInputStepper }: INumberInputContext = React.useContext( NumberInputContext ); React.useEffect(() => { setNumberInputStepper(<VStack {...props}>{children}</VStack>); }, [setNumberInputStepper, props, children]); return null; </s> remove export default ( children: React.ReactNode, indexComponent: string, startingIndex?: number ) => { let counter = startingIndex ?? -1; </s> add export default (children: React.ReactNode, startingIndex?: number) => { let counter = startingIndex ? startingIndex - 1 : -1; </s> remove let numberInputStepper: JSX.Element | null = null; const separatingNumberInputStepper = (allChildren: any) => { return React.Children.map(allChildren, (child: JSX.Element) => { if (child.type.type.name === 'NumberInputStepper') { numberInputStepper = child; return null; } else { return child; } }); }; const updatedChildren = separatingNumberInputStepper(children); </s> add </s> remove if (child.type.type.name === indexComponent) { counter++; return React.cloneElement( child, { index: counter, }, child.props.children ); } else { return child; } </s> add counter++; return React.cloneElement( child, { index: counter, }, child.props.children );
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/91d32fc90808f11d914a6722dbb653b3136ffd55
src/components/composites/Tabs/TabViews.tsx
export default (children: React.ReactNode, startingIndex?: number) => { let counter = startingIndex ? startingIndex - 1 : -1;
<mask> import React from 'react'; <mask> <mask> export default ( <mask> children: React.ReactNode, <mask> indexComponent: string, <mask> startingIndex?: number <mask> ) => { <mask> let counter = startingIndex ?? -1; <mask> const indexedChildren = React.Children.map(children, (child: any) => { <mask> if (child.type.type.name === indexComponent) { <mask> counter++; <mask> return React.cloneElement( <mask> child, </s> fix: removed child component name check </s> remove if (child.type.type.name === indexComponent) { counter++; return React.cloneElement( child, { index: counter, }, child.props.children ); } else { return child; } </s> add counter++; return React.cloneElement( child, { index: counter, }, child.props.children ); </s> remove if (child.type.type.name !== 'PinInputFiled') return child; else { pinInputFiledCounter++; return React.cloneElement( child, { fieldIndex: pinInputFiledCounter, }, child.props.children ); } </s> add pinInputFiledCounter++; return React.cloneElement( child, { fieldIndex: pinInputFiledCounter, }, child.props.children ); </s> remove import type { INumberInputSteppersProps } from './types'; </s> add import type { INumberInputSteppersProps, INumberInputContext } from './types'; import { NumberInputContext } from './Context'; </s> remove let numberInputStepper: JSX.Element | null = null; const separatingNumberInputStepper = (allChildren: any) => { return React.Children.map(allChildren, (child: JSX.Element) => { if (child.type.type.name === 'NumberInputStepper') { numberInputStepper = child; return null; } else { return child; } }); }; const updatedChildren = separatingNumberInputStepper(children); </s> add </s> remove return <Box {...props}>{getIndexedChildren(children, 'TabView')}</Box>; </s> add return <Box {...props}>{getIndexedChildren(children)}</Box>;
[ "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/91d32fc90808f11d914a6722dbb653b3136ffd55
src/utils/getIndexedChildren.ts
counter++; return React.cloneElement( child, { index: counter, }, child.props.children );
<mask> startingIndex?: number <mask> ) => { <mask> let counter = startingIndex ?? -1; <mask> const indexedChildren = React.Children.map(children, (child: any) => { <mask> if (child.type.type.name === indexComponent) { <mask> counter++; <mask> return React.cloneElement( <mask> child, <mask> { <mask> index: counter, <mask> }, <mask> child.props.children <mask> ); <mask> } else { <mask> return child; <mask> } <mask> }); <mask> return indexedChildren; <mask> }; </s> fix: removed child component name check </s> remove export default ( children: React.ReactNode, indexComponent: string, startingIndex?: number ) => { let counter = startingIndex ?? -1; </s> add export default (children: React.ReactNode, startingIndex?: number) => { let counter = startingIndex ? startingIndex - 1 : -1; </s> remove if (child.type.type.name !== 'PinInputFiled') return child; else { pinInputFiledCounter++; return React.cloneElement( child, { fieldIndex: pinInputFiledCounter, }, child.props.children ); } </s> add pinInputFiledCounter++; return React.cloneElement( child, { fieldIndex: pinInputFiledCounter, }, child.props.children ); </s> remove let numberInputStepper: JSX.Element | null = null; const separatingNumberInputStepper = (allChildren: any) => { return React.Children.map(allChildren, (child: JSX.Element) => { if (child.type.type.name === 'NumberInputStepper') { numberInputStepper = child; return null; } else { return child; } }); }; const updatedChildren = separatingNumberInputStepper(children); </s> add </s> remove return <VStack {...props}>{children}</VStack>; </s> add const { setNumberInputStepper }: INumberInputContext = React.useContext( NumberInputContext ); React.useEffect(() => { setNumberInputStepper(<VStack {...props}>{children}</VStack>); }, [setNumberInputStepper, props, children]); return null; </s> remove return <Box {...props}>{getIndexedChildren(children, 'TabView')}</Box>; </s> add return <Box {...props}>{getIndexedChildren(children)}</Box>;
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/91d32fc90808f11d914a6722dbb653b3136ffd55
src/utils/getIndexedChildren.ts
<Heading size="lg" fontSize={60} bold>
<mask> import { Heading } from 'native-base'; <mask> <mask> export default function () { <mask> return ( <mask> <Heading size="lg" fontSize={50}> <mask> I'm overriding this heading <mask> </Heading> <mask> ); <mask> } </s> fix: few examples in text and overlay </s> remove { disableOverlay, position: 'bottom', backgroundColor: '#5511ff44' } </s> add { disableOverlay, position: 'bottom', closeOnPress: false, backgroundColor: '#5511ff44', } </s> remove <VStack space={2} alignItems="center"> </s> add <VStack space={2} alignItems="center" width={350}> </s> remove <Button onPress={closeOverlay}>Hide Overlay</Button> </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/91fcaff4949fc9a9522c513100157c9fa2a98b12
example/storybook/stories/components/primitives/Heading/OverridenStyle.tsx
{ disableOverlay, position: 'bottom', closeOnPress: false, backgroundColor: '#5511ff44', }
<mask> <Button <mask> onPress={() => <mask> setOverlay( <mask> <Button onPress={closeOverlay}>Press to close Overlay</Button>, <mask> { disableOverlay, position: 'bottom', backgroundColor: '#5511ff44' } <mask> ) <mask> } <mask> > <mask> Show Overlay <mask> </Button> </s> fix: few examples in text and overlay </s> remove <Heading size="lg" fontSize={50}> </s> add <Heading size="lg" fontSize={60} bold> </s> remove <VStack space={2} alignItems="center"> </s> add <VStack space={2} alignItems="center" width={350}> </s> remove <Button onPress={closeOverlay}>Hide Overlay</Button> </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/91fcaff4949fc9a9522c513100157c9fa2a98b12
example/storybook/stories/components/primitives/Overlay/Customized.tsx
<mask> }} <mask> > <mask> {disableOverlay ? 'Enable ' : 'Disable '}Overlay <mask> </Button> <mask> <Button onPress={closeOverlay}>Hide Overlay</Button> <mask> </VStack> <mask> ); <mask> } </s> fix: few examples in text and overlay </s> remove { disableOverlay, position: 'bottom', backgroundColor: '#5511ff44' } </s> add { disableOverlay, position: 'bottom', closeOnPress: false, backgroundColor: '#5511ff44', } </s> remove <Heading size="lg" fontSize={50}> </s> add <Heading size="lg" fontSize={60} bold> </s> remove <VStack space={2} alignItems="center"> </s> add <VStack space={2} alignItems="center" width={350}>
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/91fcaff4949fc9a9522c513100157c9fa2a98b12
example/storybook/stories/components/primitives/Overlay/Customized.tsx
<VStack space={2} alignItems="center" width={350}>
<mask> import { Text, VStack, Heading } from 'native-base'; <mask> <mask> export default function () { <mask> return ( <mask> <VStack space={2} alignItems="center"> <mask> <Heading mt={3}>Truncated </Heading> <mask> <Text isTruncated> <mask> Lorem ipsum is placeholder text commonly used in the graphic, print, and <mask> publishing industries for previewing layouts and visual mockups. <mask> </Text> </s> fix: few examples in text and overlay </s> remove { disableOverlay, position: 'bottom', backgroundColor: '#5511ff44' } </s> add { disableOverlay, position: 'bottom', closeOnPress: false, backgroundColor: '#5511ff44', } </s> remove <Heading size="lg" fontSize={50}> </s> add <Heading size="lg" fontSize={60} bold> </s> remove <Button onPress={closeOverlay}>Hide Overlay</Button> </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/91fcaff4949fc9a9522c513100157c9fa2a98b12
example/storybook/stories/components/primitives/Text/Truncated.tsx
icon={<Icon as={AntDesign} name="meho" />} borderRadius="full"
<mask> <mask> export const Example = () => { <mask> return ( <mask> <IconButton <mask> variant="solid" <mask> _icon={{ <mask> color: 'red.500', <mask> }} <mask> _hover={{ <mask> bg: 'red.900', </s> feat: added usePropsResolution for IconButton </s> remove bg: 'red.900', </s> add bg: 'red.500:alpha.20', </s> remove color: 'blue.500', </s> add color: 'red.500', name: 'smileo', }, }} _pressed={{ bg: 'lime.500:alpha.20', _icon: { name: 'smile-circle', color: 'lime.500', }, }} _ios={{ _icon: { size: '2xl', }, _pressed: { bg: 'amber.500:alpha.20', _icon: { size: '2xl', name: 'smile-circle', color: 'amber.500', }, </s> remove const useFocus = () => { </s> add export const useFocus = () => { </s> remove const useIsPressed = () => { </s> add export const useIsPressed = () => {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
example/storybook/stories/components/composites/IconButton/Basic.tsx
size: 'md',
<mask> _icon={{ <mask> color: 'red.500', <mask> }} <mask> _hover={{ <mask> bg: 'red.500:alpha.20', <mask> _icon: { <mask> color: 'red.500', </s> feat: added usePropsResolution for IconButton </s> remove bg: 'red.900', </s> add bg: 'red.500:alpha.20', </s> remove color: 'blue.500', </s> add color: 'red.500', name: 'smileo', }, }} _pressed={{ bg: 'lime.500:alpha.20', _icon: { name: 'smile-circle', color: 'lime.500', }, }} _ios={{ _icon: { size: '2xl', }, _pressed: { bg: 'amber.500:alpha.20', _icon: { size: '2xl', name: 'smile-circle', color: 'amber.500', }, </s> remove variant="solid" </s> add icon={<Icon as={AntDesign} name="meho" />} borderRadius="full" </s> remove icon={<Icon size="md" as={<AntDesign name="search1" />} color="white" />} </s> add
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
example/storybook/stories/components/composites/IconButton/Basic.tsx
bg: 'red.500:alpha.20',
<mask> _icon={{ <mask> color: 'red.500', <mask> }} <mask> _hover={{ <mask> bg: 'red.900', <mask> _icon: { <mask> color: 'blue.500', <mask> }, <mask> }} <mask> icon={<Icon size="md" as={<AntDesign name="search1" />} color="white" />} </s> feat: added usePropsResolution for IconButton </s> remove color: 'blue.500', </s> add color: 'red.500', name: 'smileo', }, }} _pressed={{ bg: 'lime.500:alpha.20', _icon: { name: 'smile-circle', color: 'lime.500', }, }} _ios={{ _icon: { size: '2xl', }, _pressed: { bg: 'amber.500:alpha.20', _icon: { size: '2xl', name: 'smile-circle', color: 'amber.500', }, </s> remove icon={<Icon size="md" as={<AntDesign name="search1" />} color="white" />} </s> add </s> remove variant="solid" </s> add icon={<Icon as={AntDesign} name="meho" />} borderRadius="full" </s> remove _light: { dependentOn: 'colormode', priority: specificityPrecedence[7] }, _dark: { dependentOn: 'colormode', priority: specificityPrecedence[7] }, </s> add _light: { dependentOn: 'colormode', priority: SPECIFICITY_10 }, _dark: { dependentOn: 'colormode', priority: SPECIFICITY_10 },
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
example/storybook/stories/components/composites/IconButton/Basic.tsx
color: 'red.500', name: 'smileo', }, }} _pressed={{ bg: 'lime.500:alpha.20', _icon: { name: 'smile-circle', color: 'lime.500', }, }} _ios={{ _icon: { size: '2xl', }, _pressed: { bg: 'amber.500:alpha.20', _icon: { size: '2xl', name: 'smile-circle', color: 'amber.500', },
<mask> }} <mask> _hover={{ <mask> bg: 'red.900', <mask> _icon: { <mask> color: 'blue.500', <mask> }, <mask> }} <mask> icon={<Icon size="md" as={<AntDesign name="search1" />} color="white" />} <mask> /> <mask> ); </s> feat: added usePropsResolution for IconButton </s> remove bg: 'red.900', </s> add bg: 'red.500:alpha.20', </s> remove icon={<Icon size="md" as={<AntDesign name="search1" />} color="white" />} </s> add </s> remove variant="solid" </s> add icon={<Icon as={AntDesign} name="meho" />} borderRadius="full"
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
example/storybook/stories/components/composites/IconButton/Basic.tsx
<mask> _icon: { <mask> color: 'blue.500', <mask> }, <mask> }} <mask> icon={<Icon size="md" as={<AntDesign name="search1" />} color="white" />} <mask> /> <mask> ); <mask> }; </s> feat: added usePropsResolution for IconButton </s> remove bg: 'red.900', </s> add bg: 'red.500:alpha.20', </s> remove color: 'blue.500', </s> add color: 'red.500', name: 'smileo', }, }} _pressed={{ bg: 'lime.500:alpha.20', _icon: { name: 'smile-circle', color: 'lime.500', }, }} _ios={{ _icon: { size: '2xl', }, _pressed: { bg: 'amber.500:alpha.20', _icon: { size: '2xl', name: 'smile-circle', color: 'amber.500', }, </s> remove variant="solid" </s> add icon={<Icon as={AntDesign} name="meho" />} borderRadius="full" </s> remove const useFocus = () => { </s> add export const useFocus = () => {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
example/storybook/stories/components/composites/IconButton/Basic.tsx
import { composeEventHandlers } from '../../../utils';
<mask> import React, { memo, forwardRef } from 'react'; <mask> import { Pressable } from '../../primitives/Pressable'; <mask> import { Icon } from '../../primitives/Icon'; <mask> import { usePropsResolutionTest } from '../../../hooks/useThemeProps'; <mask> import type { IIconButtonProps } from './types'; <mask> import { <mask> useHover, <mask> useFocus, </s> feat: added usePropsResolution for IconButton </s> remove const useHover = () => { </s> add export const useHover = () => { </s> remove const HIGHEST_PREF = 100; const specificityPrecedence = [HIGHEST_PREF, 70, 60, 55, 50, 40, 30, 10, 1]; </s> add const SPECIFICITY_100 = 100; const SPECIFICITY_70 = 70; const SPECIFICITY_60 = 60; const SPECIFICITY_55 = 55; const SPECIFICITY_50 = 50; const SPECIFICITY_40 = 40; const SPECIFICITY_30 = 30; const SPECIFICITY_10 = 10; const SPECIFICITY_1 = 1; const specificityPrecedence = [ SPECIFICITY_100, SPECIFICITY_70, SPECIFICITY_60, SPECIFICITY_55, SPECIFICITY_50, SPECIFICITY_40, SPECIFICITY_30, SPECIFICITY_10, SPECIFICITY_1, ]; </s> remove const Pressable = ( { children, </s> add const Pressable = ({ children, ...props }: IPressableProps, ref: any) => { const { hoverProps, isHovered } = useHover(); const { pressableProps, isPressed } = useIsPressed(); const { focusProps, isFocused } = useFocus(); const { isFocusVisible, focusProps: focusRingProps }: any = useFocusRing(); const { </s> remove ...props }: IPressableProps, ref: any ) => { const { hoverProps, isHovered } = useHover(); const { pressableProps, isPressed } = useIsPressed(); const { focusProps, isFocused } = useFocus(); const { isFocusVisible, focusProps: focusRingProps }: any = useFocusRing(); const { ...resolvedProps } = usePropsResolutionTest('Pressable', props, { </s> add ...resolvedProps } = usePropsResolutionTest('Pressable', props, {
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/components/composites/IconButton/index.tsx
import { useHover, useFocus, useIsPressed, } from '../../primitives/Pressable/Pressable';
<mask> import { Icon } from '../../primitives/Icon'; <mask> import { usePropsResolutionTest } from '../../../hooks/useThemeProps'; <mask> import { composeEventHandlers } from '../../../utils'; <mask> import type { IIconButtonProps } from './types'; <mask> <mask> const IconButton = ( <mask> { icon, children, ...props }: IIconButtonProps, <mask> ref: any <mask> ) => { <mask> const { hoverProps, isHovered } = useHover(); </s> feat: added usePropsResolution for IconButton </s> remove const useHover = () => { </s> add export const useHover = () => { </s> remove const { _icon, ...resolvedProps } = usePropsResolutionTest( 'IconButton', props ); </s> add const { hoverProps, isHovered } = useHover(); const { pressableProps, isPressed } = useIsPressed(); const { focusProps, isFocused } = useFocus(); const { _icon, onPressIn, onPressOut, onHoverIn, onHoverOut, onFocus, onBlur, ...resolvedProps } = usePropsResolutionTest('IconButton', props, { isHovered, isPressed, isFocused, }); </s> remove const Pressable = ( { children, </s> add const Pressable = ({ children, ...props }: IPressableProps, ref: any) => { const { hoverProps, isHovered } = useHover(); const { pressableProps, isPressed } = useIsPressed(); const { focusProps, isFocused } = useFocus(); const { isFocusVisible, focusProps: focusRingProps }: any = useFocusRing(); const { </s> remove ...props }: IPressableProps, ref: any ) => { const { hoverProps, isHovered } = useHover(); const { pressableProps, isPressed } = useIsPressed(); const { focusProps, isFocused } = useFocus(); const { isFocusVisible, focusProps: focusRingProps }: any = useFocusRing(); const { ...resolvedProps } = usePropsResolutionTest('Pressable', props, { </s> add ...resolvedProps } = usePropsResolutionTest('Pressable', props, {
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/components/composites/IconButton/index.tsx
const { hoverProps, isHovered } = useHover(); const { pressableProps, isPressed } = useIsPressed(); const { focusProps, isFocused } = useFocus(); const { _icon, onPressIn, onPressOut, onHoverIn, onHoverOut, onFocus, onBlur, ...resolvedProps } = usePropsResolutionTest('IconButton', props, { isHovered, isPressed, isFocused, });
<mask> const IconButton = ( <mask> { icon, children, ...props }: IIconButtonProps, <mask> ref: any <mask> ) => { <mask> const { _icon, ...resolvedProps } = usePropsResolutionTest( <mask> 'IconButton', <mask> props <mask> ); <mask> <mask> let clonedIcon; <mask> if (icon) { <mask> clonedIcon = React.cloneElement(icon, { <mask> ..._icon, </s> feat: added usePropsResolution for IconButton </s> remove ...props }: IPressableProps, ref: any ) => { const { hoverProps, isHovered } = useHover(); const { pressableProps, isPressed } = useIsPressed(); const { focusProps, isFocused } = useFocus(); const { isFocusVisible, focusProps: focusRingProps }: any = useFocusRing(); const { ...resolvedProps } = usePropsResolutionTest('Pressable', props, { </s> add ...resolvedProps } = usePropsResolutionTest('Pressable', props, { </s> remove const Pressable = ( { children, </s> add const Pressable = ({ children, ...props }: IPressableProps, ref: any) => { const { hoverProps, isHovered } = useHover(); const { pressableProps, isPressed } = useIsPressed(); const { focusProps, isFocused } = useFocus(); const { isFocusVisible, focusProps: focusRingProps }: any = useFocusRing(); const { </s> remove if (pseudoPropsMap[property]) { </s> add if ( pseudoPropsMap[property] && (state[pseudoPropsMap[property]?.respondTo] || ['_dark', '_light', '_web', '_ios', '_android'].includes(property)) // array of state independent props ) { </s> remove const useHover = () => { </s> add export const useHover = () => {
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/components/composites/IconButton/index.tsx
<Pressable ref={ref} onPressIn={composeEventHandlers(onPressIn, pressableProps.onPressIn)} onPressOut={composeEventHandlers(onPressOut, pressableProps.onPressOut)} // @ts-ignore - web only onHoverIn={composeEventHandlers(onHoverIn, hoverProps.onHoverIn)} // @ts-ignore - web only onHoverOut={composeEventHandlers(onHoverOut, hoverProps.onHoverOut)} // @ts-ignore - web only onFocus={composeEventHandlers( composeEventHandlers(onFocus, focusProps.onFocus) // focusRingProps.onFocu )} // @ts-ignore - web only onBlur={composeEventHandlers( composeEventHandlers(onBlur, focusProps.onBlur) // focusRingProps.onBlur )} {...resolvedProps} >
<mask> }); <mask> } <mask> <mask> return ( <mask> <Pressable ref={ref} {...resolvedProps}> <mask> {clonedIcon || <Icon {..._icon}>{children}</Icon>} <mask> </Pressable> <mask> ); <mask> }; <mask> </s> feat: added usePropsResolution for IconButton </s> remove // TODO : Replace Render props with Context Hook </s> add // TODO: Replace Render props with Context Hook </s> remove if (pseudoPropsMap[property]) { </s> add if ( pseudoPropsMap[property] && (state[pseudoPropsMap[property]?.respondTo] || ['_dark', '_light', '_web', '_ios', '_android'].includes(property)) // array of state independent props ) { </s> remove const { _icon, ...resolvedProps } = usePropsResolutionTest( 'IconButton', props ); </s> add const { hoverProps, isHovered } = useHover(); const { pressableProps, isPressed } = useIsPressed(); const { focusProps, isFocused } = useFocus(); const { _icon, onPressIn, onPressOut, onHoverIn, onHoverOut, onFocus, onBlur, ...resolvedProps } = usePropsResolutionTest('IconButton', props, { isHovered, isPressed, isFocused, }); </s> remove icon={<Icon size="md" as={<AntDesign name="search1" />} color="white" />} </s> add </s> remove const useIsPressed = () => { </s> add export const useIsPressed = () => {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/components/composites/IconButton/index.tsx
/** * */ _hover?: IIconButtonProps; /** * */ _pressed?: IIconButtonProps; /** * */ _focus?: IIconButtonProps;
<mask> * Props to be passed to the icon used inside of IconButton. <mask> */ <mask> _icon?: IIconProps; <mask> } </s> feat: added usePropsResolution for IconButton </s> remove priority: specificityPrecedence[6], </s> add priority: SPECIFICITY_30, </s> remove _light: { dependentOn: 'colormode', priority: specificityPrecedence[7] }, _dark: { dependentOn: 'colormode', priority: specificityPrecedence[7] }, </s> add _light: { dependentOn: 'colormode', priority: SPECIFICITY_10 }, _dark: { dependentOn: 'colormode', priority: SPECIFICITY_10 }, </s> remove if (pseudoPropsMap[property]) { </s> add if ( pseudoPropsMap[property] && (state[pseudoPropsMap[property]?.respondTo] || ['_dark', '_light', '_web', '_ios', '_android'].includes(property)) // array of state independent props ) { </s> remove _web: { dependentOn: 'platform', priority: specificityPrecedence[7] }, _ios: { dependentOn: 'platform', priority: specificityPrecedence[7] }, _android: { dependentOn: 'platform', priority: specificityPrecedence[7] }, </s> add _web: { dependentOn: 'platform', priority: SPECIFICITY_10 }, _ios: { dependentOn: 'platform', priority: SPECIFICITY_10 }, _android: { dependentOn: 'platform', priority: SPECIFICITY_10 }, </s> remove [HIGHEST_PREF]: 0, 70: 0, 60: 0, 50: 0, 55: 0, 40: 0, 30: 0, 10: 0, 1: priority, </s> add [SPECIFICITY_100]: 0, [SPECIFICITY_70]: 0, [SPECIFICITY_60]: 0, [SPECIFICITY_50]: 0, [SPECIFICITY_55]: 0, [SPECIFICITY_40]: 0, [SPECIFICITY_30]: 0, [SPECIFICITY_10]: 0, [SPECIFICITY_1]: priority,
[ "keep", "keep", "add", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/components/composites/IconButton/types.ts
export const useHover = () => {
<mask> } from '../../../hooks/useThemeProps'; <mask> import { useFocusRing } from '@react-native-aria/focus'; <mask> import { makeStyledComponent } from '../../../utils/styled'; <mask> <mask> const useHover = () => { <mask> const [isHovered, setHovered] = React.useState(false); <mask> return { <mask> hoverProps: { <mask> onHoverIn: () => setHovered(true), <mask> onHoverOut: () => setHovered(false), </s> feat: added usePropsResolution for IconButton </s> remove const useFocus = () => { </s> add export const useFocus = () => { </s> remove const useIsPressed = () => { </s> add export const useIsPressed = () => { </s> remove variant="solid" </s> add icon={<Icon as={AntDesign} name="meho" />} borderRadius="full"
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/components/primitives/Pressable/Pressable.tsx
export const useFocus = () => {
<mask> isHovered, <mask> }; <mask> }; <mask> <mask> const useFocus = () => { <mask> const [isFocused, setFocused] = React.useState(false); <mask> return { <mask> focusProps: { <mask> onFocus: () => setFocused(true), <mask> onBlur: () => setFocused(false), </s> feat: added usePropsResolution for IconButton </s> remove const useIsPressed = () => { </s> add export const useIsPressed = () => { </s> remove const useHover = () => { </s> add export const useHover = () => { </s> remove variant="solid" </s> add icon={<Icon as={AntDesign} name="meho" />} borderRadius="full" </s> remove const Pressable = ( { children, </s> add const Pressable = ({ children, ...props }: IPressableProps, ref: any) => { const { hoverProps, isHovered } = useHover(); const { pressableProps, isPressed } = useIsPressed(); const { focusProps, isFocused } = useFocus(); const { isFocusVisible, focusProps: focusRingProps }: any = useFocusRing(); const { </s> remove ...props }: IPressableProps, ref: any ) => { const { hoverProps, isHovered } = useHover(); const { pressableProps, isPressed } = useIsPressed(); const { focusProps, isFocused } = useFocus(); const { isFocusVisible, focusProps: focusRingProps }: any = useFocusRing(); const { ...resolvedProps } = usePropsResolutionTest('Pressable', props, { </s> add ...resolvedProps } = usePropsResolutionTest('Pressable', props, {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/components/primitives/Pressable/Pressable.tsx
export const useIsPressed = () => {
<mask> isFocused, <mask> }; <mask> }; <mask> <mask> const useIsPressed = () => { <mask> const [isPressed, setIsPressed] = React.useState(false); <mask> return { <mask> pressableProps: { <mask> onPressIn: () => setIsPressed(true), <mask> onPressOut: () => setIsPressed(false), </s> feat: added usePropsResolution for IconButton </s> remove const useFocus = () => { </s> add export const useFocus = () => { </s> remove const useHover = () => { </s> add export const useHover = () => { </s> remove variant="solid" </s> add icon={<Icon as={AntDesign} name="meho" />} borderRadius="full" </s> remove priority: specificityPrecedence[0], </s> add priority: SPECIFICITY_100, </s> remove const Pressable = ( { children, </s> add const Pressable = ({ children, ...props }: IPressableProps, ref: any) => { const { hoverProps, isHovered } = useHover(); const { pressableProps, isPressed } = useIsPressed(); const { focusProps, isFocused } = useFocus(); const { isFocusVisible, focusProps: focusRingProps }: any = useFocusRing(); const {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/components/primitives/Pressable/Pressable.tsx
const Pressable = ({ children, ...props }: IPressableProps, ref: any) => { const { hoverProps, isHovered } = useHover(); const { pressableProps, isPressed } = useIsPressed(); const { focusProps, isFocused } = useFocus(); const { isFocusVisible, focusProps: focusRingProps }: any = useFocusRing(); const {
<mask> }; <mask> <mask> const StyledPressable = makeStyledComponent(RNPressable); <mask> <mask> const Pressable = ( <mask> { <mask> children, <mask> onPressIn, <mask> onPressOut, <mask> onHoverIn, <mask> onHoverOut, <mask> onFocus, </s> feat: added usePropsResolution for IconButton </s> remove const { _icon, ...resolvedProps } = usePropsResolutionTest( 'IconButton', props ); </s> add const { hoverProps, isHovered } = useHover(); const { pressableProps, isPressed } = useIsPressed(); const { focusProps, isFocused } = useFocus(); const { _icon, onPressIn, onPressOut, onHoverIn, onHoverOut, onFocus, onBlur, ...resolvedProps } = usePropsResolutionTest('IconButton', props, { isHovered, isPressed, isFocused, }); </s> remove ...props }: IPressableProps, ref: any ) => { const { hoverProps, isHovered } = useHover(); const { pressableProps, isPressed } = useIsPressed(); const { focusProps, isFocused } = useFocus(); const { isFocusVisible, focusProps: focusRingProps }: any = useFocusRing(); const { ...resolvedProps } = usePropsResolutionTest('Pressable', props, { </s> add ...resolvedProps } = usePropsResolutionTest('Pressable', props, { </s> remove const useFocus = () => { </s> add export const useFocus = () => { </s> remove const useIsPressed = () => { </s> add export const useIsPressed = () => {
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/components/primitives/Pressable/Pressable.tsx
...resolvedProps } = usePropsResolutionTest('Pressable', props, {
<mask> onHoverIn, <mask> onHoverOut, <mask> onFocus, <mask> onBlur, <mask> ...props <mask> }: IPressableProps, <mask> ref: any <mask> ) => { <mask> const { hoverProps, isHovered } = useHover(); <mask> const { pressableProps, isPressed } = useIsPressed(); <mask> const { focusProps, isFocused } = useFocus(); <mask> const { isFocusVisible, focusProps: focusRingProps }: any = useFocusRing(); <mask> <mask> const { ...resolvedProps } = usePropsResolutionTest('Pressable', props, { <mask> isHovered, <mask> isPressed, <mask> isFocused, <mask> isFocusVisible, <mask> }); </s> feat: added usePropsResolution for IconButton </s> remove const Pressable = ( { children, </s> add const Pressable = ({ children, ...props }: IPressableProps, ref: any) => { const { hoverProps, isHovered } = useHover(); const { pressableProps, isPressed } = useIsPressed(); const { focusProps, isFocused } = useFocus(); const { isFocusVisible, focusProps: focusRingProps }: any = useFocusRing(); const { </s> remove const { _icon, ...resolvedProps } = usePropsResolutionTest( 'IconButton', props ); </s> add const { hoverProps, isHovered } = useHover(); const { pressableProps, isPressed } = useIsPressed(); const { focusProps, isFocused } = useFocus(); const { _icon, onPressIn, onPressOut, onHoverIn, onHoverOut, onFocus, onBlur, ...resolvedProps } = usePropsResolutionTest('IconButton', props, { isHovered, isPressed, isFocused, }); </s> remove const useFocus = () => { </s> add export const useFocus = () => { </s> remove const useHover = () => { </s> add export const useHover = () => {
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/components/primitives/Pressable/Pressable.tsx
// TODO: Replace Render props with Context Hook
<mask> isFocused, <mask> isFocusVisible, <mask> }); <mask> <mask> // TODO : Replace Render props with Context Hook <mask> return ( <mask> <StyledPressable <mask> ref={ref} <mask> onPressIn={composeEventHandlers(onPressIn, pressableProps.onPressIn)} <mask> onPressOut={composeEventHandlers(onPressOut, pressableProps.onPressOut)} </s> feat: added usePropsResolution for IconButton </s> remove <Pressable ref={ref} {...resolvedProps}> </s> add <Pressable ref={ref} onPressIn={composeEventHandlers(onPressIn, pressableProps.onPressIn)} onPressOut={composeEventHandlers(onPressOut, pressableProps.onPressOut)} // @ts-ignore - web only onHoverIn={composeEventHandlers(onHoverIn, hoverProps.onHoverIn)} // @ts-ignore - web only onHoverOut={composeEventHandlers(onHoverOut, hoverProps.onHoverOut)} // @ts-ignore - web only onFocus={composeEventHandlers( composeEventHandlers(onFocus, focusProps.onFocus) // focusRingProps.onFocu )} // @ts-ignore - web only onBlur={composeEventHandlers( composeEventHandlers(onBlur, focusProps.onBlur) // focusRingProps.onBlur )} {...resolvedProps} > </s> remove ...props }: IPressableProps, ref: any ) => { const { hoverProps, isHovered } = useHover(); const { pressableProps, isPressed } = useIsPressed(); const { focusProps, isFocused } = useFocus(); const { isFocusVisible, focusProps: focusRingProps }: any = useFocusRing(); const { ...resolvedProps } = usePropsResolutionTest('Pressable', props, { </s> add ...resolvedProps } = usePropsResolutionTest('Pressable', props, { </s> remove const { _icon, ...resolvedProps } = usePropsResolutionTest( 'IconButton', props ); </s> add const { hoverProps, isHovered } = useHover(); const { pressableProps, isPressed } = useIsPressed(); const { focusProps, isFocused } = useFocus(); const { _icon, onPressIn, onPressOut, onHoverIn, onHoverOut, onFocus, onBlur, ...resolvedProps } = usePropsResolutionTest('IconButton', props, { isHovered, isPressed, isFocused, }); </s> remove if (pseudoPropsMap[property]) { </s> add if ( pseudoPropsMap[property] && (state[pseudoPropsMap[property]?.respondTo] || ['_dark', '_light', '_web', '_ios', '_android'].includes(property)) // array of state independent props ) {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/components/primitives/Pressable/Pressable.tsx
const SPECIFICITY_100 = 100; const SPECIFICITY_70 = 70; const SPECIFICITY_60 = 60; const SPECIFICITY_55 = 55; const SPECIFICITY_50 = 50; const SPECIFICITY_40 = 40; const SPECIFICITY_30 = 30; const SPECIFICITY_10 = 10; const SPECIFICITY_1 = 1; const specificityPrecedence = [ SPECIFICITY_100, SPECIFICITY_70, SPECIFICITY_60, SPECIFICITY_55, SPECIFICITY_50, SPECIFICITY_40, SPECIFICITY_30, SPECIFICITY_10, SPECIFICITY_1, ];
<mask> import merge from 'lodash.merge'; <mask> <mask> const HIGHEST_PREF = 100; <mask> const specificityPrecedence = [HIGHEST_PREF, 70, 60, 55, 50, 40, 30, 10, 1]; <mask> <mask> const pseudoPropsMap = { <mask> _web: { dependentOn: 'platform', priority: specificityPrecedence[7] }, <mask> _ios: { dependentOn: 'platform', priority: specificityPrecedence[7] }, <mask> _android: { dependentOn: 'platform', priority: specificityPrecedence[7] }, </s> feat: added usePropsResolution for IconButton </s> remove _web: { dependentOn: 'platform', priority: specificityPrecedence[7] }, _ios: { dependentOn: 'platform', priority: specificityPrecedence[7] }, _android: { dependentOn: 'platform', priority: specificityPrecedence[7] }, </s> add _web: { dependentOn: 'platform', priority: SPECIFICITY_10 }, _ios: { dependentOn: 'platform', priority: SPECIFICITY_10 }, _android: { dependentOn: 'platform', priority: SPECIFICITY_10 }, </s> remove _light: { dependentOn: 'colormode', priority: specificityPrecedence[7] }, _dark: { dependentOn: 'colormode', priority: specificityPrecedence[7] }, </s> add _light: { dependentOn: 'colormode', priority: SPECIFICITY_10 }, _dark: { dependentOn: 'colormode', priority: SPECIFICITY_10 }, </s> remove const useHover = () => { </s> add export const useHover = () => { </s> remove priority: specificityPrecedence[0], </s> add priority: SPECIFICITY_100,
[ "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/hooks/useThemeProps/useFlattenProps.tsx
_web: { dependentOn: 'platform', priority: SPECIFICITY_10 }, _ios: { dependentOn: 'platform', priority: SPECIFICITY_10 }, _android: { dependentOn: 'platform', priority: SPECIFICITY_10 },
<mask> const HIGHEST_PREF = 100; <mask> const specificityPrecedence = [HIGHEST_PREF, 70, 60, 55, 50, 40, 30, 10, 1]; <mask> <mask> const pseudoPropsMap = { <mask> _web: { dependentOn: 'platform', priority: specificityPrecedence[7] }, <mask> _ios: { dependentOn: 'platform', priority: specificityPrecedence[7] }, <mask> _android: { dependentOn: 'platform', priority: specificityPrecedence[7] }, <mask> <mask> _light: { dependentOn: 'colormode', priority: specificityPrecedence[7] }, <mask> _dark: { dependentOn: 'colormode', priority: specificityPrecedence[7] }, <mask> <mask> // TODO: have to add more interactionProps and stateProps </s> feat: added usePropsResolution for IconButton </s> remove _light: { dependentOn: 'colormode', priority: specificityPrecedence[7] }, _dark: { dependentOn: 'colormode', priority: specificityPrecedence[7] }, </s> add _light: { dependentOn: 'colormode', priority: SPECIFICITY_10 }, _dark: { dependentOn: 'colormode', priority: SPECIFICITY_10 }, </s> remove const HIGHEST_PREF = 100; const specificityPrecedence = [HIGHEST_PREF, 70, 60, 55, 50, 40, 30, 10, 1]; </s> add const SPECIFICITY_100 = 100; const SPECIFICITY_70 = 70; const SPECIFICITY_60 = 60; const SPECIFICITY_55 = 55; const SPECIFICITY_50 = 50; const SPECIFICITY_40 = 40; const SPECIFICITY_30 = 30; const SPECIFICITY_10 = 10; const SPECIFICITY_1 = 1; const specificityPrecedence = [ SPECIFICITY_100, SPECIFICITY_70, SPECIFICITY_60, SPECIFICITY_55, SPECIFICITY_50, SPECIFICITY_40, SPECIFICITY_30, SPECIFICITY_10, SPECIFICITY_1, ]; </s> remove priority: specificityPrecedence[6], </s> add priority: SPECIFICITY_30, </s> remove priority: specificityPrecedence[2], </s> add priority: SPECIFICITY_60, </s> remove priority: specificityPrecedence[6], </s> add priority: SPECIFICITY_30,
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/hooks/useThemeProps/useFlattenProps.tsx
_light: { dependentOn: 'colormode', priority: SPECIFICITY_10 }, _dark: { dependentOn: 'colormode', priority: SPECIFICITY_10 },
<mask> _web: { dependentOn: 'platform', priority: specificityPrecedence[7] }, <mask> _ios: { dependentOn: 'platform', priority: specificityPrecedence[7] }, <mask> _android: { dependentOn: 'platform', priority: specificityPrecedence[7] }, <mask> <mask> _light: { dependentOn: 'colormode', priority: specificityPrecedence[7] }, <mask> _dark: { dependentOn: 'colormode', priority: specificityPrecedence[7] }, <mask> <mask> // TODO: have to add more interactionProps and stateProps <mask> _indeterminate: { <mask> dependentOn: 'state', <mask> respondTo: 'isIndeterminate', </s> feat: added usePropsResolution for IconButton </s> remove _web: { dependentOn: 'platform', priority: specificityPrecedence[7] }, _ios: { dependentOn: 'platform', priority: specificityPrecedence[7] }, _android: { dependentOn: 'platform', priority: specificityPrecedence[7] }, </s> add _web: { dependentOn: 'platform', priority: SPECIFICITY_10 }, _ios: { dependentOn: 'platform', priority: SPECIFICITY_10 }, _android: { dependentOn: 'platform', priority: SPECIFICITY_10 }, </s> remove priority: specificityPrecedence[6], </s> add priority: SPECIFICITY_30, </s> remove const HIGHEST_PREF = 100; const specificityPrecedence = [HIGHEST_PREF, 70, 60, 55, 50, 40, 30, 10, 1]; </s> add const SPECIFICITY_100 = 100; const SPECIFICITY_70 = 70; const SPECIFICITY_60 = 60; const SPECIFICITY_55 = 55; const SPECIFICITY_50 = 50; const SPECIFICITY_40 = 40; const SPECIFICITY_30 = 30; const SPECIFICITY_10 = 10; const SPECIFICITY_1 = 1; const specificityPrecedence = [ SPECIFICITY_100, SPECIFICITY_70, SPECIFICITY_60, SPECIFICITY_55, SPECIFICITY_50, SPECIFICITY_40, SPECIFICITY_30, SPECIFICITY_10, SPECIFICITY_1, ]; </s> remove priority: specificityPrecedence[2], </s> add priority: SPECIFICITY_60, </s> remove priority: specificityPrecedence[5], </s> add priority: SPECIFICITY_40,
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/hooks/useThemeProps/useFlattenProps.tsx
priority: SPECIFICITY_30,
<mask> // TODO: have to add more interactionProps and stateProps <mask> _indeterminate: { <mask> dependentOn: 'state', <mask> respondTo: 'isIndeterminate', <mask> priority: specificityPrecedence[6], <mask> }, <mask> _checked: { <mask> dependentOn: 'state', <mask> respondTo: 'isChecked', <mask> priority: specificityPrecedence[6], </s> feat: added usePropsResolution for IconButton </s> remove _light: { dependentOn: 'colormode', priority: specificityPrecedence[7] }, _dark: { dependentOn: 'colormode', priority: specificityPrecedence[7] }, </s> add _light: { dependentOn: 'colormode', priority: SPECIFICITY_10 }, _dark: { dependentOn: 'colormode', priority: SPECIFICITY_10 }, </s> remove priority: specificityPrecedence[6], </s> add priority: SPECIFICITY_30, </s> remove _web: { dependentOn: 'platform', priority: specificityPrecedence[7] }, _ios: { dependentOn: 'platform', priority: specificityPrecedence[7] }, _android: { dependentOn: 'platform', priority: specificityPrecedence[7] }, </s> add _web: { dependentOn: 'platform', priority: SPECIFICITY_10 }, _ios: { dependentOn: 'platform', priority: SPECIFICITY_10 }, _android: { dependentOn: 'platform', priority: SPECIFICITY_10 }, </s> remove priority: specificityPrecedence[4], </s> add priority: SPECIFICITY_50, </s> remove priority: specificityPrecedence[3], </s> add priority: SPECIFICITY_55,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/hooks/useThemeProps/useFlattenProps.tsx
priority: SPECIFICITY_30,
<mask> }, <mask> _checked: { <mask> dependentOn: 'state', <mask> respondTo: 'isChecked', <mask> priority: specificityPrecedence[6], <mask> }, <mask> _invalid: { <mask> dependentOn: 'state', <mask> respondTo: 'isInvalid', <mask> priority: specificityPrecedence[5], </s> feat: added usePropsResolution for IconButton </s> remove priority: specificityPrecedence[5], </s> add priority: SPECIFICITY_40, </s> remove priority: specificityPrecedence[6], </s> add priority: SPECIFICITY_30, </s> remove priority: specificityPrecedence[3], </s> add priority: SPECIFICITY_55, </s> remove priority: specificityPrecedence[4], </s> add priority: SPECIFICITY_50, </s> remove priority: specificityPrecedence[1], </s> add priority: SPECIFICITY_70,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/hooks/useThemeProps/useFlattenProps.tsx
priority: SPECIFICITY_40,
<mask> }, <mask> _invalid: { <mask> dependentOn: 'state', <mask> respondTo: 'isInvalid', <mask> priority: specificityPrecedence[5], <mask> }, <mask> _focus: { <mask> dependentOn: 'state', <mask> respondTo: 'isFocused', <mask> priority: specificityPrecedence[4], </s> feat: added usePropsResolution for IconButton </s> remove priority: specificityPrecedence[4], </s> add priority: SPECIFICITY_50, </s> remove priority: specificityPrecedence[6], </s> add priority: SPECIFICITY_30, </s> remove priority: specificityPrecedence[3], </s> add priority: SPECIFICITY_55, </s> remove priority: specificityPrecedence[1], </s> add priority: SPECIFICITY_70, </s> remove priority: specificityPrecedence[2], </s> add priority: SPECIFICITY_60,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/hooks/useThemeProps/useFlattenProps.tsx
priority: SPECIFICITY_50,
<mask> }, <mask> _focus: { <mask> dependentOn: 'state', <mask> respondTo: 'isFocused', <mask> priority: specificityPrecedence[4], <mask> }, <mask> _focusVisible: { <mask> dependentOn: 'state', <mask> respondTo: 'isFocusVisible', <mask> priority: specificityPrecedence[3], </s> feat: added usePropsResolution for IconButton </s> remove priority: specificityPrecedence[3], </s> add priority: SPECIFICITY_55, </s> remove priority: specificityPrecedence[5], </s> add priority: SPECIFICITY_40, </s> remove priority: specificityPrecedence[6], </s> add priority: SPECIFICITY_30, </s> remove priority: specificityPrecedence[1], </s> add priority: SPECIFICITY_70, </s> remove priority: specificityPrecedence[2], </s> add priority: SPECIFICITY_60,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/hooks/useThemeProps/useFlattenProps.tsx
priority: SPECIFICITY_55,
<mask> }, <mask> _focusVisible: { <mask> dependentOn: 'state', <mask> respondTo: 'isFocusVisible', <mask> priority: specificityPrecedence[3], <mask> }, <mask> _hover: { <mask> dependentOn: 'state', <mask> respondTo: 'isHovered', <mask> priority: specificityPrecedence[2], </s> feat: added usePropsResolution for IconButton </s> remove priority: specificityPrecedence[2], </s> add priority: SPECIFICITY_60, </s> remove priority: specificityPrecedence[4], </s> add priority: SPECIFICITY_50, </s> remove priority: specificityPrecedence[6], </s> add priority: SPECIFICITY_30, </s> remove priority: specificityPrecedence[5], </s> add priority: SPECIFICITY_40, </s> remove priority: specificityPrecedence[1], </s> add priority: SPECIFICITY_70,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/hooks/useThemeProps/useFlattenProps.tsx
priority: SPECIFICITY_60,
<mask> }, <mask> _hover: { <mask> dependentOn: 'state', <mask> respondTo: 'isHovered', <mask> priority: specificityPrecedence[2], <mask> }, <mask> _pressed: { <mask> dependentOn: 'state', <mask> respondTo: 'isPressed', <mask> priority: specificityPrecedence[1], </s> feat: added usePropsResolution for IconButton </s> remove priority: specificityPrecedence[3], </s> add priority: SPECIFICITY_55, </s> remove priority: specificityPrecedence[1], </s> add priority: SPECIFICITY_70, </s> remove priority: specificityPrecedence[6], </s> add priority: SPECIFICITY_30, </s> remove priority: specificityPrecedence[5], </s> add priority: SPECIFICITY_40, </s> remove priority: specificityPrecedence[4], </s> add priority: SPECIFICITY_50,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/hooks/useThemeProps/useFlattenProps.tsx
priority: SPECIFICITY_70,
<mask> }, <mask> _pressed: { <mask> dependentOn: 'state', <mask> respondTo: 'isPressed', <mask> priority: specificityPrecedence[1], <mask> }, <mask> _disabled: { <mask> dependentOn: 'state', <mask> respondTo: 'isDisabled', <mask> priority: specificityPrecedence[0], </s> feat: added usePropsResolution for IconButton </s> remove priority: specificityPrecedence[2], </s> add priority: SPECIFICITY_60, </s> remove priority: specificityPrecedence[0], </s> add priority: SPECIFICITY_100, </s> remove priority: specificityPrecedence[3], </s> add priority: SPECIFICITY_55, </s> remove priority: specificityPrecedence[6], </s> add priority: SPECIFICITY_30, </s> remove priority: specificityPrecedence[5], </s> add priority: SPECIFICITY_40,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/hooks/useThemeProps/useFlattenProps.tsx
priority: SPECIFICITY_100,
<mask> }, <mask> _disabled: { <mask> dependentOn: 'state', <mask> respondTo: 'isDisabled', <mask> priority: specificityPrecedence[0], <mask> }, <mask> }; <mask> <mask> const compareSpecificity = (exisiting: any, upcoming: any, property: any) => { <mask> if (!exisiting) return true; </s> feat: added usePropsResolution for IconButton </s> remove priority: specificityPrecedence[1], </s> add priority: SPECIFICITY_70, </s> remove priority: specificityPrecedence[5], </s> add priority: SPECIFICITY_40, </s> remove priority: specificityPrecedence[6], </s> add priority: SPECIFICITY_30, </s> remove priority: specificityPrecedence[2], </s> add priority: SPECIFICITY_60, </s> remove priority: specificityPrecedence[3], </s> add priority: SPECIFICITY_55,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/hooks/useThemeProps/useFlattenProps.tsx
[SPECIFICITY_100]: 0, [SPECIFICITY_70]: 0, [SPECIFICITY_60]: 0, [SPECIFICITY_50]: 0, [SPECIFICITY_55]: 0, [SPECIFICITY_40]: 0, [SPECIFICITY_30]: 0, [SPECIFICITY_10]: 0, [SPECIFICITY_1]: priority,
<mask> // NOTE: the order is important here. Keep in mind while specificity breakpoints. <mask> const propertySpecity = currentSpecificity <mask> ? { ...currentSpecificity } <mask> : { <mask> [HIGHEST_PREF]: 0, <mask> 70: 0, <mask> 60: 0, <mask> 50: 0, <mask> 55: 0, <mask> 40: 0, <mask> 30: 0, <mask> 10: 0, <mask> 1: priority, <mask> }; <mask> <mask> // @ts-ignore <mask> // if (state[pseudoPropsMap[property]?.respondTo]) { <mask> if (pseudoPropsMap[property]) { </s> feat: added usePropsResolution for IconButton </s> remove if (pseudoPropsMap[property]) { </s> add if ( pseudoPropsMap[property] && (state[pseudoPropsMap[property]?.respondTo] || ['_dark', '_light', '_web', '_ios', '_android'].includes(property)) // array of state independent props ) { </s> remove const { _icon, ...resolvedProps } = usePropsResolutionTest( 'IconButton', props ); </s> add const { hoverProps, isHovered } = useHover(); const { pressableProps, isPressed } = useIsPressed(); const { focusProps, isFocused } = useFocus(); const { _icon, onPressIn, onPressOut, onHoverIn, onHoverOut, onFocus, onBlur, ...resolvedProps } = usePropsResolutionTest('IconButton', props, { isHovered, isPressed, isFocused, });
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/hooks/useThemeProps/useFlattenProps.tsx
if ( pseudoPropsMap[property] && (state[pseudoPropsMap[property]?.respondTo] || ['_dark', '_light', '_web', '_ios', '_android'].includes(property)) // array of state independent props ) {
<mask> }; <mask> <mask> // @ts-ignore <mask> // if (state[pseudoPropsMap[property]?.respondTo]) { <mask> if (pseudoPropsMap[property]) { <mask> // @ts-ignore <mask> <mask> if (shouldResolvePseudoProp({ property, state, platform, colormode })) { <mask> propertySpecity[pseudoPropsMap[property].priority]++; <mask> </s> feat: added usePropsResolution for IconButton </s> remove [HIGHEST_PREF]: 0, 70: 0, 60: 0, 50: 0, 55: 0, 40: 0, 30: 0, 10: 0, 1: priority, </s> add [SPECIFICITY_100]: 0, [SPECIFICITY_70]: 0, [SPECIFICITY_60]: 0, [SPECIFICITY_50]: 0, [SPECIFICITY_55]: 0, [SPECIFICITY_40]: 0, [SPECIFICITY_30]: 0, [SPECIFICITY_10]: 0, [SPECIFICITY_1]: priority, </s> remove priority: specificityPrecedence[0], </s> add priority: SPECIFICITY_100,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/hooks/useThemeProps/useFlattenProps.tsx
// @ts-ignore
<mask> // @ts-ignore <mask> <mask> if (shouldResolvePseudoProp({ property, state, platform, colormode })) { <mask> propertySpecity[pseudoPropsMap[property].priority]++; <mask> <mask> pleaseDoThisForMe( <mask> { <mask> props: props[property], </s> feat: added usePropsResolution for IconButton </s> remove if (pseudoPropsMap[property]) { </s> add if ( pseudoPropsMap[property] && (state[pseudoPropsMap[property]?.respondTo] || ['_dark', '_light', '_web', '_ios', '_android'].includes(property)) // array of state independent props ) { </s> remove [HIGHEST_PREF]: 0, 70: 0, 60: 0, 50: 0, 55: 0, 40: 0, 30: 0, 10: 0, 1: priority, </s> add [SPECIFICITY_100]: 0, [SPECIFICITY_70]: 0, [SPECIFICITY_60]: 0, [SPECIFICITY_50]: 0, [SPECIFICITY_55]: 0, [SPECIFICITY_40]: 0, [SPECIFICITY_30]: 0, [SPECIFICITY_10]: 0, [SPECIFICITY_1]: priority,
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/hooks/useThemeProps/useFlattenProps.tsx
// @ts-ignore
<mask> // @ts-ignore <mask> } else if ( <mask> compareSpecificity(specificityMap[property], propertySpecity, property) <mask> ) { <mask> // STEP : update specificity <mask> <mask> // @ts-ignore </s> feat: added usePropsResolution for IconButton </s> remove if (pseudoPropsMap[property]) { </s> add if ( pseudoPropsMap[property] && (state[pseudoPropsMap[property]?.respondTo] || ['_dark', '_light', '_web', '_ios', '_android'].includes(property)) // array of state independent props ) { </s> remove [HIGHEST_PREF]: 0, 70: 0, 60: 0, 50: 0, 55: 0, 40: 0, 30: 0, 10: 0, 1: priority, </s> add [SPECIFICITY_100]: 0, [SPECIFICITY_70]: 0, [SPECIFICITY_60]: 0, [SPECIFICITY_50]: 0, [SPECIFICITY_55]: 0, [SPECIFICITY_40]: 0, [SPECIFICITY_30]: 0, [SPECIFICITY_10]: 0, [SPECIFICITY_1]: priority,
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/hooks/useThemeProps/useFlattenProps.tsx
// @ts-ignore
<mask> if (property.startsWith('_')) { <mask> // merging internal props (like, _text, _checked, ...) <mask> flattenProps[property] = merge( <mask> {}, <mask> // @ts-ignore <mask> flattenProps[property], </s> feat: added usePropsResolution for IconButton </s> remove if (pseudoPropsMap[property]) { </s> add if ( pseudoPropsMap[property] && (state[pseudoPropsMap[property]?.respondTo] || ['_dark', '_light', '_web', '_ios', '_android'].includes(property)) // array of state independent props ) {
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/hooks/useThemeProps/useFlattenProps.tsx
// @ts-ignore
<mask> flattenProps[property] = merge( <mask> {}, <mask> flattenProps[property], <mask> props[property] <mask> ); <mask> } else { <mask> // replacing simple props (like, p, m, bg, color, ...) <mask> </s> feat: added usePropsResolution for IconButton </s> remove const { _icon, ...resolvedProps } = usePropsResolutionTest( 'IconButton', props ); </s> add const { hoverProps, isHovered } = useHover(); const { pressableProps, isPressed } = useIsPressed(); const { focusProps, isFocused } = useFocus(); const { _icon, onPressIn, onPressOut, onHoverIn, onHoverOut, onFocus, onBlur, ...resolvedProps } = usePropsResolutionTest('IconButton', props, { isHovered, isPressed, isFocused, }); </s> remove if (pseudoPropsMap[property]) { </s> add if ( pseudoPropsMap[property] && (state[pseudoPropsMap[property]?.respondTo] || ['_dark', '_light', '_web', '_ios', '_android'].includes(property)) // array of state independent props ) {
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/hooks/useThemeProps/useFlattenProps.tsx
// @ts-ignore
<mask> } else { <mask> // replacing simple props (like, p, m, bg, color, ...) <mask> <mask> flattenProps[property] = props[property]; <mask> } <mask> } <mask> } </s> feat: added usePropsResolution for IconButton </s> remove const { _icon, ...resolvedProps } = usePropsResolutionTest( 'IconButton', props ); </s> add const { hoverProps, isHovered } = useHover(); const { pressableProps, isPressed } = useIsPressed(); const { focusProps, isFocused } = useFocus(); const { _icon, onPressIn, onPressOut, onHoverIn, onHoverOut, onFocus, onBlur, ...resolvedProps } = usePropsResolutionTest('IconButton', props, { isHovered, isPressed, isFocused, });
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/92f56eb9c33f0cc9d64724e39c071e037de23e88
src/hooks/useThemeProps/useFlattenProps.tsx
leftIcon={ <Icon name="menu" color="white" size={6} type="MaterialIcons" /> } colorScheme="blue"
<mask> export default function () { <mask> return ( <mask> <HStack space={2}> <mask> <Button <mask> leftIcon={<Icon name="menu" size={6} type="MaterialIcons" />} <mask> colorScheme="indigo" <mask> > <mask> Menu <mask> </Button> <mask> <Button <mask> isDisabled </s> feat: fixed icon button margins </s> remove <Button key={size} size={size} colorScheme="teal"> </s> add <Button key={size} size={size} colorScheme="coolGray" variant="outline" isDisabled > </s> remove <Box mr={innerButtonProps.px / 2 || 2}>{leftIcon}</Box> </s> add <Box mr={Math.floor(innerButtonProps.px / 2) || 2}>{leftIcon}</Box> </s> remove <Box ml={innerButtonProps.px / 2 || 2}>{rightIcon}</Box> </s> add <Box ml={Math.floor(innerButtonProps.px / 2) || 2}>{rightIcon}</Box>
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/930b9bce72eadcc4a0ecb6fe96fd01d4532e07e2
example/storybook/stories/components/primitives/Button/icons.tsx
<Button key={size} size={size} colorScheme="coolGray" variant="outline" isDisabled >
<mask> export default function () { <mask> return ( <mask> <HStack space={2}> <mask> {['xs', 'sm', 'md', 'lg'].map((size: any) => ( <mask> <Button key={size} size={size} colorScheme="teal"> <mask> Button <mask> </Button> <mask> ))} <mask> </HStack> <mask> ); </s> feat: fixed icon button margins </s> remove <Box mr={innerButtonProps.px / 2 || 2}>{leftIcon}</Box> </s> add <Box mr={Math.floor(innerButtonProps.px / 2) || 2}>{leftIcon}</Box> </s> remove <Box ml={innerButtonProps.px / 2 || 2}>{rightIcon}</Box> </s> add <Box ml={Math.floor(innerButtonProps.px / 2) || 2}>{rightIcon}</Box> </s> remove leftIcon={<Icon name="menu" size={6} type="MaterialIcons" />} colorScheme="indigo" </s> add leftIcon={ <Icon name="menu" color="white" size={6} type="MaterialIcons" /> } colorScheme="blue"
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/930b9bce72eadcc4a0ecb6fe96fd01d4532e07e2
example/storybook/stories/components/primitives/Button/sizes.tsx
<Box mr={Math.floor(innerButtonProps.px / 2) || 2}>{leftIcon}</Box>
<mask> opacity={isLoading ? 0.5 : 1} <mask> style={style} <mask> > <mask> {leftIcon ? ( <mask> <Box mr={innerButtonProps.px / 2 || 2}>{leftIcon}</Box> <mask> ) : null} <mask> {isLoading ? ( <mask> <Flex direction="row"> <mask> {spinner ? spinner : <Spinner color={textProps.color} size="sm" />} <mask> <Text {...textProps}>{isLoadingText ? ' ' + isLoadingText : ''}</Text> </s> feat: fixed icon button margins </s> remove <Button key={size} size={size} colorScheme="teal"> </s> add <Button key={size} size={size} colorScheme="coolGray" variant="outline" isDisabled > </s> remove leftIcon={<Icon name="menu" size={6} type="MaterialIcons" />} colorScheme="indigo" </s> add leftIcon={ <Icon name="menu" color="white" size={6} type="MaterialIcons" /> } colorScheme="blue" </s> remove <Box ml={innerButtonProps.px / 2 || 2}>{rightIcon}</Box> </s> add <Box ml={Math.floor(innerButtonProps.px / 2) || 2}>{rightIcon}</Box>
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/930b9bce72eadcc4a0ecb6fe96fd01d4532e07e2
src/components/primitives/Button/index.tsx