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
import type { IImageProps } from '../../primitives/Image';
<mask> import type { IBoxProps } from '../../primitives/Box'; <mask> import type { ImageSourcePropType } from 'react-native'; <mask> import type { MutableRefObject } from 'react'; <mask> import type { ResponsiveValue } from '../../../components/types'; <mask> import type { ISizes } from '../../../theme/base/sizes'; <mask> <mask> export interface IAvatarProps extends IBoxProps<IAvatarProps> { </s> feat: api improvement avatar, added vertical avatargroup support </s> remove import Flex from '../../primitives/Flex'; </s> add import Box from '../../primitives/Box'; </s> remove import { Box, Image, Text } from '../../primitives'; </s> add import { Box, Image } from '../../primitives'; </s> remove borderWidth: 2, borderColor: mode('gray.50', 'gray.800')(props), bg: mode('gray.600', 'gray.100')(props), </s> add flexDirection: isVertical ? 'column-reverse' : 'row-reverse', </s> remove function baseStyle(props: Record<string, any>) { </s> add function baseStyle({ isVertical, ...props }: Record<string, any>) { </s> remove const { boxSize, ...newProps } = usePropsResolution('AvatarBadge', props); </s> add const resolvedProps = usePropsResolution('AvatarBadge', props);
[ "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b5676d18e9be13ed3dfcd4f1742c5f0424342218
src/components/composites/Avatar/types.tsx
/** * For providing props to Image component inside Avatar */ _image?: IImageProps;
<mask> * The size of the avatar <mask> * @default md <mask> */ <mask> size?: ResponsiveValue<ISizes | (string & {}) | number>; <mask> /** <mask> * ref to be attached to Avatar wrapper <mask> */ <mask> wrapperRef?: MutableRefObject<any>; </s> feat: api improvement avatar, added vertical avatargroup support </s> remove plusAvatarBg?: string, props?: any </s> add _hiddenAvatarPlaceholder?: Object, _avatar?: any, isVertical?: Boolean </s> remove import Flex from '../../primitives/Flex'; </s> add import Box from '../../primitives/Box'; </s> remove const { _text, source, style, ...resolvedProps } = usePropsResolution( </s> add const { _text, _image, source, ...resolvedProps } = usePropsResolution(
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b5676d18e9be13ed3dfcd4f1742c5f0424342218
src/components/composites/Avatar/types.tsx
* @default -4
<mask> space?: number; <mask> /** <mask> * The max number of avatar. <mask> */ <mask> max?: number; <mask> /** <mask> * Make Avatar.Group render in vertical direction. </s> feat: api improvement avatar, added vertical avatargroup support </s> remove plusAvatarBg?: string, props?: any </s> add _hiddenAvatarPlaceholder?: Object, _avatar?: any, isVertical?: Boolean </s> remove const AvatarGroup = (allProps: IAvatarGroupProps, ref: any) => { const { children, ...props } = allProps; const { borderColor, borderWidth, bg, space, max } = usePropsResolution( 'AvatarGroup', props ); </s> add const AvatarGroup = ({ children, ...props }: IAvatarGroupProps, ref: any) => { const { max, _avatar, _hiddenAvatarPlaceholder, isVertical, space, ...resolvedProps } = usePropsResolution('AvatarGroup', props); </s> remove React.Children.map(children, (child, key) => { </s> add React.Children.map(children, (child) => {
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b5676d18e9be13ed3dfcd4f1742c5f0424342218
src/components/composites/Avatar/types.tsx
/** * Make Avatar.Group render in vertical direction. * @default false */ isVertical?: Boolean; /** * For providing props to all Avatar in that Avatar.Group */ _avatar?: IAvatarProps; /** * For providing props to the Avatar that shows the count of remaining Avatars that are not visible when max is applied. */ _hiddenAvatarPlaceholder?: IAvatarProps;
<mask> * @default -4 <mask> */ <mask> max?: number; <mask> } <mask> <mask> export type IAvatarComponentType = (( <mask> props: IAvatarProps & { ref?: MutableRefObject<any> } </s> feat: api improvement avatar, added vertical avatargroup support </s> remove import { Box, Image, Text } from '../../primitives'; </s> add import { Box, Image } from '../../primitives'; </s> remove const { boxSize, ...newProps } = usePropsResolution('AvatarBadge', props); </s> add const resolvedProps = usePropsResolution('AvatarBadge', props);
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b5676d18e9be13ed3dfcd4f1742c5f0424342218
src/components/composites/Avatar/types.tsx
size: 3, position: 'absolute', right: 0, bottom: 0,
<mask> borderWidth: 2, <mask> borderColor: mode('light.50', 'gray.800')(props), <mask> bg: mode('gray.600', 'light.100')(props), <mask> }; <mask> } <mask> <mask> export default { baseStyle }; </s> feat: api improvement avatar, added vertical avatargroup support </s> remove borderWidth: 2, borderColor: mode('gray.50', 'gray.800')(props), bg: mode('gray.600', 'gray.100')(props), </s> add flexDirection: isVertical ? 'column-reverse' : 'row-reverse', </s> remove function baseStyle(props: Record<string, any>) { </s> add function baseStyle({ isVertical, ...props }: Record<string, any>) { </s> remove export default { baseStyle }; </s> add export default { baseStyle, defaultProps: { isVertical: false, }, }; </s> remove <Flex flexDirection="row-reverse" ref={ref}> {getAvatarGroupChildren(children, space, max, bg, { borderColor, borderWidth, ...props, })} </Flex> </s> add <Box {...resolvedProps} ref={ref}> {getAvatarGroupChildren( children, space, max, _hiddenAvatarPlaceholder, _avatar, isVertical )} </Box>
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b5676d18e9be13ed3dfcd4f1742c5f0424342218
src/theme/components/avatar-badge.ts
function baseStyle({ isVertical, ...props }: Record<string, any>) {
<mask> import { mode } from '../tools'; <mask> <mask> function baseStyle(props: Record<string, any>) { <mask> return { <mask> borderWidth: 2, <mask> borderColor: mode('gray.50', 'gray.800')(props), <mask> bg: mode('gray.600', 'gray.100')(props), <mask> space: -4, </s> feat: api improvement avatar, added vertical avatargroup support </s> remove borderWidth: 2, borderColor: mode('gray.50', 'gray.800')(props), bg: mode('gray.600', 'gray.100')(props), </s> add flexDirection: isVertical ? 'column-reverse' : 'row-reverse', </s> remove import Flex from '../../primitives/Flex'; </s> add import Box from '../../primitives/Box';
[ "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b5676d18e9be13ed3dfcd4f1742c5f0424342218
src/theme/components/avatar-group.ts
flexDirection: isVertical ? 'column-reverse' : 'row-reverse',
<mask> import { mode } from '../tools'; <mask> <mask> function baseStyle(props: Record<string, any>) { <mask> return { <mask> borderWidth: 2, <mask> borderColor: mode('gray.50', 'gray.800')(props), <mask> bg: mode('gray.600', 'gray.100')(props), <mask> space: -4, <mask> }; <mask> } <mask> <mask> export default { baseStyle }; </s> feat: api improvement avatar, added vertical avatargroup support </s> remove function baseStyle(props: Record<string, any>) { </s> add function baseStyle({ isVertical, ...props }: Record<string, any>) { </s> remove export default { baseStyle }; </s> add export default { baseStyle, defaultProps: { isVertical: false, }, }; </s> remove import Flex from '../../primitives/Flex'; </s> add import Box from '../../primitives/Box';
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b5676d18e9be13ed3dfcd4f1742c5f0424342218
src/theme/components/avatar-group.ts
_avatar: { borderColor: mode('gray.50', 'gray.800')(props), borderWidth: 2, }, _hiddenAvatarPlaceholder: { bg: mode('gray.600', 'gray.100')(props), },
<mask> flexDirection: isVertical ? 'column-reverse' : 'row-reverse', <mask> space: -4, <mask> }; <mask> } <mask> <mask> export default { <mask> baseStyle, <mask> defaultProps: { </s> feat: api improvement avatar, added vertical avatargroup support </s> remove borderWidth: 2, borderColor: mode('gray.50', 'gray.800')(props), bg: mode('gray.600', 'gray.100')(props), </s> add flexDirection: isVertical ? 'column-reverse' : 'row-reverse', </s> remove export default { baseStyle }; </s> add export default { baseStyle, defaultProps: { isVertical: false, }, }; </s> remove const defaultProps = { ml: space, </s> add const spacingProps = { ml: isVertical ? 0 : space, mt: isVertical ? space : 0, </s> remove function baseStyle(props: Record<string, any>) { </s> add function baseStyle({ isVertical, ...props }: Record<string, any>) { </s> remove <Flex flexDirection="row-reverse" ref={ref}> {getAvatarGroupChildren(children, space, max, bg, { borderColor, borderWidth, ...props, })} </Flex> </s> add <Box {...resolvedProps} ref={ref}> {getAvatarGroupChildren( children, space, max, _hiddenAvatarPlaceholder, _avatar, isVertical )} </Box>
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b5676d18e9be13ed3dfcd4f1742c5f0424342218
src/theme/components/avatar-group.ts
export default { baseStyle, defaultProps: { isVertical: false, }, };
<mask> space: -4, <mask> }; <mask> } <mask> <mask> export default { baseStyle }; </s> feat: api improvement avatar, added vertical avatargroup support </s> remove borderWidth: 2, borderColor: mode('gray.50', 'gray.800')(props), bg: mode('gray.600', 'gray.100')(props), </s> add flexDirection: isVertical ? 'column-reverse' : 'row-reverse', </s> remove function baseStyle(props: Record<string, any>) { </s> add function baseStyle({ isVertical, ...props }: Record<string, any>) { </s> remove <Flex flexDirection="row-reverse" ref={ref}> {getAvatarGroupChildren(children, space, max, bg, { borderColor, borderWidth, ...props, })} </Flex> </s> add <Box {...resolvedProps} ref={ref}> {getAvatarGroupChildren( children, space, max, _hiddenAvatarPlaceholder, _avatar, isVertical )} </Box>
[ "keep", "keep", "keep", "keep", "replace" ]
https://github.com/GeekyAnts/NativeBase/commit/b5676d18e9be13ed3dfcd4f1742c5f0424342218
src/theme/components/avatar-group.ts
_image: { borderRadius: 'full', alt: '--', _alt: { fontWeight: 600, }, style: { height: '100%', width: '100%', }, },
<mask> _text: { <mask> fontWeight: 600, <mask> }, <mask> }; <mask> }; <mask> <mask> function getSize(size: any, fontSize: string) { <mask> return { <mask> width: size, </s> feat: api improvement avatar, added vertical avatargroup support </s> remove export default { baseStyle }; </s> add export default { baseStyle, defaultProps: { isVertical: false, }, }; </s> remove borderWidth: 2, borderColor: mode('gray.50', 'gray.800')(props), bg: mode('gray.600', 'gray.100')(props), </s> add flexDirection: isVertical ? 'column-reverse' : 'row-reverse', </s> remove function baseStyle(props: Record<string, any>) { </s> add function baseStyle({ isVertical, ...props }: Record<string, any>) { </s> remove const imageFitStyle: any = { height: '100%', width: '100%' }; </s> add
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b5676d18e9be13ed3dfcd4f1742c5f0424342218
src/theme/components/avatar.ts
_customDropdownIconProps,
<mask> _selectedItem, <mask> onOpen, <mask> onClose, <mask> optimized, <mask> customDropdownIconProps, <mask> _actionSheet, <mask> _actionSheetContent, <mask> _actionSheetBody, <mask> _webSelect, <mask> ...resolvedProps </s> fix: select component icons size differs in light and dark mode </s> remove customDropdownIconProps: { color: 'muted.400', mr: '3' }, </s> add _customDropdownIconProps: { color: 'muted.400', mr: '3' }, </s> remove customDropdownIconProps: { </s> add _customDropdownIconProps: { </s> remove <ChevronDownIcon {...customDropdownIconProps} /> </s> add <ChevronDownIcon {..._customDropdownIconProps} />
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b5755ab359ceb9a7b12eb9840fa31ee6d5cccf69
src/components/primitives/Select/Select.tsx
<ChevronDownIcon {..._customDropdownIconProps} />
<mask> dropdownCloseIcon <mask> ) : dropdownIcon ? ( <mask> dropdownIcon <mask> ) : ( <mask> <ChevronDownIcon {...customDropdownIconProps} /> <mask> ); <mask> <mask> const handleClose = () => { <mask> setIsOpen(false); <mask> onClose && onClose(); </s> fix: select component icons size differs in light and dark mode </s> remove customDropdownIconProps: { color: 'muted.400', mr: '3' }, </s> add _customDropdownIconProps: { color: 'muted.400', mr: '3' }, </s> remove customDropdownIconProps: { </s> add _customDropdownIconProps: { </s> remove customDropdownIconProps, </s> add _customDropdownIconProps,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b5755ab359ceb9a7b12eb9840fa31ee6d5cccf69
src/components/primitives/Select/Select.tsx
_customDropdownIconProps: {
<mask> selection: { <mask> start: 0, <mask> }, <mask> <mask> customDropdownIconProps: { <mask> color: 'muted.500', <mask> mr: '3', <mask> size: '6', <mask> p: '1', <mask> }, </s> fix: select component icons size differs in light and dark mode </s> remove customDropdownIconProps: { color: 'muted.400', mr: '3' }, </s> add _customDropdownIconProps: { color: 'muted.400', mr: '3' }, </s> remove <ChevronDownIcon {...customDropdownIconProps} /> </s> add <ChevronDownIcon {..._customDropdownIconProps} /> </s> remove customDropdownIconProps, </s> add _customDropdownIconProps,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b5755ab359ceb9a7b12eb9840fa31ee6d5cccf69
src/theme/components/select.ts
_customDropdownIconProps: { color: 'muted.400', mr: '3' },
<mask> borderColor: 'error.600', <mask> }, <mask> <mask> _dark: { <mask> customDropdownIconProps: { color: 'muted.400', mr: '3' }, <mask> _hover: { <mask> borderColor: 'primary.500', <mask> }, <mask> _focus: { <mask> borderColor: 'primary.500', </s> fix: select component icons size differs in light and dark mode </s> remove customDropdownIconProps: { </s> add _customDropdownIconProps: { </s> remove <ChevronDownIcon {...customDropdownIconProps} /> </s> add <ChevronDownIcon {..._customDropdownIconProps} /> </s> remove customDropdownIconProps, </s> add _customDropdownIconProps,
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b5755ab359ceb9a7b12eb9840fa31ee6d5cccf69
src/theme/components/select.ts
<Box w="100%" alignItems="center">
<mask> import { Popover, Button, Box } from 'native-base'; <mask> <mask> export function Example() { <mask> return ( <mask> <Box h="60%" w="100%" alignItems="center"> <mask> <Popover <mask> trigger={(triggerProps) => { <mask> return ( <mask> <Button {...triggerProps} colorScheme="danger"> <mask> Delete Customer </s> fix: remove height from box </s> remove <Box h="60%" w="100%" alignItems="center"> </s> add <Box w="100%" alignItems="center"> </s> remove <Box h="60%" w="100%" alignItems="center"> </s> add <Box w="100%" alignItems="center">
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b5c3704a423d7d3faec78d866b358bd7a4475899
example/storybook/stories/components/composites/Popover/Basic.tsx
<Box w="100%" alignItems="center">
<mask> const [position, setPosition] = useState('auto'); <mask> const [isOpen, setIsOpen] = useState(false); <mask> <mask> return ( <mask> <Box h="60%" w="100%" alignItems="center"> <mask> <VStack space={6} alignSelf="flex-start" w="100%"> <mask> <Popover <mask> // @ts-ignore <mask> placement={position === 'auto' ? undefined : position} <mask> trigger={(triggerProps) => { </s> fix: remove height from box </s> remove <Box h="60%" w="100%" alignItems="center"> </s> add <Box w="100%" alignItems="center"> </s> remove <Box h="60%" w="100%" alignItems="center"> </s> add <Box w="100%" alignItems="center">
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b5c3704a423d7d3faec78d866b358bd7a4475899
example/storybook/stories/components/composites/Popover/PopoverPositions.tsx
<Box w="100%" alignItems="center">
<mask> <mask> export function Example() { <mask> const initialFocusRef = React.useRef(null); <mask> return ( <mask> <Box h="60%" w="100%" alignItems="center"> <mask> <Popover <mask> initialFocusRef={initialFocusRef} <mask> trigger={(triggerProps) => { <mask> return <Button {...triggerProps}>Edit Info</Button>; <mask> }} </s> fix: remove height from box </s> remove <Box h="60%" w="100%" alignItems="center"> </s> add <Box w="100%" alignItems="center"> </s> remove <Box h="60%" w="100%" alignItems="center"> </s> add <Box w="100%" alignItems="center">
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b5c3704a423d7d3faec78d866b358bd7a4475899
example/storybook/stories/components/composites/Popover/RefEg.tsx
if(children.length === 1) { return children; }
<mask> <mask> const children = React.Children.toArray(this.props.children); <mask> <mask> const buttons = children.filter((item) => item.type == Button); <mask> const title = children.filter((item) => item.type == Title); <mask> const subtitle = children.filter((item) => item.type == Subtitle); </s> Fix bug when passing null children
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b62a0ae986c7ee203cb3253381e6c64201a6f6a8
Components/Widgets/Header.js
it('renders header with a null button', () => { const tree = renderer.create( <Header> {null} <Title>Header</Title> </Header> ).toJSON(); expect(tree).toMatchSnapshot(); });
<mask> expect(tree).toMatchSnapshot(); <mask> }); <mask> <mask> it('renders header with buttons and subtitle', () => { <mask> const tree = renderer.create( <mask> <Header> <mask> <Button transparent> </s> Fix bug when passing null children
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b62a0ae986c7ee203cb3253381e6c64201a6f6a8
__tests__/Components/Widgets/Header.android.js
it('renders header with a null button', () => { const tree = renderer.create( <Header> {null} <Title>Header</Title> </Header> ).toJSON(); expect(tree).toMatchSnapshot(); });
<mask> expect(tree).toMatchSnapshot(); <mask> }); <mask> <mask> it('renders header with buttons and subtitle', () => { <mask> const tree = renderer.create( <mask> <Header> <mask> <Button transparent> </s> Fix bug when passing null children
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b62a0ae986c7ee203cb3253381e6c64201a6f6a8
__tests__/Components/Widgets/Header.ios.js
const Select = ({ wrapperRef, ...props }: ISelectProps, ref: any) => { const selectProps = useFormControl({ isDisabled: props.isDisabled, nativeID: props.nativeID, }); const isDisabled = selectProps.disabled; const tempFix = '__NativebasePlaceholder__'; const _ref = React.useRef(null); const [isOpen, setIsOpen] = React.useState<boolean>(false); const { focusProps, isFocusVisible } = useFocusRing(); const { hoverProps, isHovered } = useHover({ isDisabled }, _ref); const {
<mask> _selectedItem: {} as IButtonProps, <mask> _item: {} as IButtonProps, <mask> }); <mask> <mask> const Select = ( <mask> { <mask> onValueChange, <mask> selectedValue, <mask> children, <mask> dropdownIcon, <mask> dropdownCloseIcon, </s> feat: new prop resolution changes in select </s> remove const isDisabled = selectProps.disabled; const tempFix = '__NativebasePlaceholder__'; const _ref = React.useRef(null); const themeProps = usePropsResolution('Input', { ...props, size }); let [isOpen, setIsOpen] = React.useState<boolean>(false); const { focusProps, isFocusVisible } = useFocusRing(); const { hoverProps, isHovered } = useHover({ isDisabled }, _ref); </s> add </s> remove let itemsList: Array<{ label: string; value: string }> = React.Children.map( </s> add const itemsList: Array<{ label: string; value: string }> = React.Children.map( </s> remove wrapperRef, ...props }: ISelectProps, ref: any ) => { const selectProps = useFormControl({ isDisabled: props.isDisabled, nativeID: props.nativeID, </s> add size, ...resolvedProps } = usePropsResolution('Input', props, { isDisabled, isHovered, isFocusVisible, </s> remove borderRadius={themeProps.borderRadius} {...(isFocusVisible ? themeProps._focus : {})} </s> add borderRadius={resolvedProps.borderRadius} </s> remove {...(isHovered ? themeProps._hover : {})} </s> add
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b64de4e38452ea96659579941adbd7782a1e1e1d
src/components/primitives/Select/Select.tsx
<mask> dropdownOpenIcon, <mask> placeholder, <mask> accessibilityLabel, <mask> defaultValue, <mask> size, <mask> _item, <mask> _selectedItem, <mask> wrapperRef, <mask> ...props <mask> }: ISelectProps, </s> feat: new prop resolution changes in select </s> remove wrapperRef, ...props }: ISelectProps, ref: any ) => { const selectProps = useFormControl({ isDisabled: props.isDisabled, nativeID: props.nativeID, </s> add size, ...resolvedProps } = usePropsResolution('Input', props, { isDisabled, isHovered, isFocusVisible, </s> remove const Select = ( { </s> add const Select = ({ wrapperRef, ...props }: ISelectProps, ref: any) => { const selectProps = useFormControl({ isDisabled: props.isDisabled, nativeID: props.nativeID, }); const isDisabled = selectProps.disabled; const tempFix = '__NativebasePlaceholder__'; const _ref = React.useRef(null); const [isOpen, setIsOpen] = React.useState<boolean>(false); const { focusProps, isFocusVisible } = useFocusRing(); const { hoverProps, isHovered } = useHover({ isDisabled }, _ref); const { </s> remove const isDisabled = selectProps.disabled; const tempFix = '__NativebasePlaceholder__'; const _ref = React.useRef(null); const themeProps = usePropsResolution('Input', { ...props, size }); let [isOpen, setIsOpen] = React.useState<boolean>(false); const { focusProps, isFocusVisible } = useFocusRing(); const { hoverProps, isHovered } = useHover({ isDisabled }, _ref); </s> add </s> remove borderRadius={themeProps.borderRadius} {...(isFocusVisible ? themeProps._focus : {})} </s> add borderRadius={resolvedProps.borderRadius} </s> remove {...(isHovered ? themeProps._hover : {})} </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b64de4e38452ea96659579941adbd7782a1e1e1d
src/components/primitives/Select/Select.tsx
size, ...resolvedProps } = usePropsResolution('Input', props, { isDisabled, isHovered, isFocusVisible,
<mask> defaultValue, <mask> size, <mask> _item, <mask> _selectedItem, <mask> wrapperRef, <mask> ...props <mask> }: ISelectProps, <mask> ref: any <mask> ) => { <mask> const selectProps = useFormControl({ <mask> isDisabled: props.isDisabled, <mask> nativeID: props.nativeID, <mask> }); <mask> <mask> const isDisabled = selectProps.disabled; <mask> const tempFix = '__NativebasePlaceholder__'; <mask> const _ref = React.useRef(null); </s> feat: new prop resolution changes in select </s> remove const Select = ( { </s> add const Select = ({ wrapperRef, ...props }: ISelectProps, ref: any) => { const selectProps = useFormControl({ isDisabled: props.isDisabled, nativeID: props.nativeID, }); const isDisabled = selectProps.disabled; const tempFix = '__NativebasePlaceholder__'; const _ref = React.useRef(null); const [isOpen, setIsOpen] = React.useState<boolean>(false); const { focusProps, isFocusVisible } = useFocusRing(); const { hoverProps, isHovered } = useHover({ isDisabled }, _ref); const { </s> remove const isDisabled = selectProps.disabled; const tempFix = '__NativebasePlaceholder__'; const _ref = React.useRef(null); const themeProps = usePropsResolution('Input', { ...props, size }); let [isOpen, setIsOpen] = React.useState<boolean>(false); const { focusProps, isFocusVisible } = useFocusRing(); const { hoverProps, isHovered } = useHover({ isDisabled }, _ref); </s> add </s> remove size, </s> add </s> remove let itemsList: Array<{ label: string; value: string }> = React.Children.map( </s> add const itemsList: Array<{ label: string; value: string }> = React.Children.map( </s> remove borderRadius={themeProps.borderRadius} {...(isFocusVisible ? themeProps._focus : {})} </s> add borderRadius={resolvedProps.borderRadius}
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b64de4e38452ea96659579941adbd7782a1e1e1d
src/components/primitives/Select/Select.tsx
<mask> isDisabled: props.isDisabled, <mask> nativeID: props.nativeID, <mask> }); <mask> <mask> const isDisabled = selectProps.disabled; <mask> const tempFix = '__NativebasePlaceholder__'; <mask> const _ref = React.useRef(null); <mask> const themeProps = usePropsResolution('Input', { ...props, size }); <mask> let [isOpen, setIsOpen] = React.useState<boolean>(false); <mask> <mask> const { focusProps, isFocusVisible } = useFocusRing(); <mask> const { hoverProps, isHovered } = useHover({ isDisabled }, _ref); <mask> <mask> const [value, setValue] = useControllableState({ <mask> value: selectedValue, <mask> defaultValue, <mask> onChange: (newValue) => { <mask> onValueChange && onValueChange(newValue); </s> feat: new prop resolution changes in select </s> remove const Select = ( { </s> add const Select = ({ wrapperRef, ...props }: ISelectProps, ref: any) => { const selectProps = useFormControl({ isDisabled: props.isDisabled, nativeID: props.nativeID, }); const isDisabled = selectProps.disabled; const tempFix = '__NativebasePlaceholder__'; const _ref = React.useRef(null); const [isOpen, setIsOpen] = React.useState<boolean>(false); const { focusProps, isFocusVisible } = useFocusRing(); const { hoverProps, isHovered } = useHover({ isDisabled }, _ref); const { </s> remove wrapperRef, ...props }: ISelectProps, ref: any ) => { const selectProps = useFormControl({ isDisabled: props.isDisabled, nativeID: props.nativeID, </s> add size, ...resolvedProps } = usePropsResolution('Input', props, { isDisabled, isHovered, isFocusVisible, </s> remove let itemsList: Array<{ label: string; value: string }> = React.Children.map( </s> add const itemsList: Array<{ label: string; value: string }> = React.Children.map( </s> remove size, </s> add </s> remove borderRadius={themeProps.borderRadius} {...(isFocusVisible ? themeProps._focus : {})} </s> add borderRadius={resolvedProps.borderRadius}
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b64de4e38452ea96659579941adbd7782a1e1e1d
src/components/primitives/Select/Select.tsx
const itemsList: Array<{ label: string; value: string }> = React.Children.map(
<mask> setIsOpen(false); <mask> }, <mask> }); <mask> <mask> let itemsList: Array<{ label: string; value: string }> = React.Children.map( <mask> children, <mask> (child: any) => { <mask> return { <mask> label: child.props.label, <mask> value: child.props.value, </s> feat: new prop resolution changes in select </s> remove const isDisabled = selectProps.disabled; const tempFix = '__NativebasePlaceholder__'; const _ref = React.useRef(null); const themeProps = usePropsResolution('Input', { ...props, size }); let [isOpen, setIsOpen] = React.useState<boolean>(false); const { focusProps, isFocusVisible } = useFocusRing(); const { hoverProps, isHovered } = useHover({ isDisabled }, _ref); </s> add </s> remove const Select = ( { </s> add const Select = ({ wrapperRef, ...props }: ISelectProps, ref: any) => { const selectProps = useFormControl({ isDisabled: props.isDisabled, nativeID: props.nativeID, }); const isDisabled = selectProps.disabled; const tempFix = '__NativebasePlaceholder__'; const _ref = React.useRef(null); const [isOpen, setIsOpen] = React.useState<boolean>(false); const { focusProps, isFocusVisible } = useFocusRing(); const { hoverProps, isHovered } = useHover({ isDisabled }, _ref); const { </s> remove wrapperRef, ...props }: ISelectProps, ref: any ) => { const selectProps = useFormControl({ isDisabled: props.isDisabled, nativeID: props.nativeID, </s> add size, ...resolvedProps } = usePropsResolution('Input', props, { isDisabled, isHovered, isFocusVisible, </s> remove borderRadius={themeProps.borderRadius} {...(isFocusVisible ? themeProps._focus : {})} </s> add borderRadius={resolvedProps.borderRadius} </s> remove {...(isHovered ? themeProps._hover : {})} </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b64de4e38452ea96659579941adbd7782a1e1e1d
src/components/primitives/Select/Select.tsx
<mask> focusable={false} <mask> size={size} <mask> variant={variant} <mask> InputRightElement={rightIcon} <mask> {...(isHovered ? themeProps._hover : {})} <mask> {...nonLayoutProps} <mask> {...borderProps} <mask> isDisabled={isDisabled} <mask> /> <mask> ); </s> feat: new prop resolution changes in select </s> remove borderRadius={themeProps.borderRadius} {...(isFocusVisible ? themeProps._focus : {})} </s> add borderRadius={resolvedProps.borderRadius} </s> remove let itemsList: Array<{ label: string; value: string }> = React.Children.map( </s> add const itemsList: Array<{ label: string; value: string }> = React.Children.map( </s> remove const isDisabled = selectProps.disabled; const tempFix = '__NativebasePlaceholder__'; const _ref = React.useRef(null); const themeProps = usePropsResolution('Input', { ...props, size }); let [isOpen, setIsOpen] = React.useState<boolean>(false); const { focusProps, isFocusVisible } = useFocusRing(); const { hoverProps, isHovered } = useHover({ isDisabled }, _ref); </s> add </s> remove wrapperRef, ...props }: ISelectProps, ref: any ) => { const selectProps = useFormControl({ isDisabled: props.isDisabled, nativeID: props.nativeID, </s> add size, ...resolvedProps } = usePropsResolution('Input', props, { isDisabled, isHovered, isFocusVisible, </s> remove size, </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b64de4e38452ea96659579941adbd7782a1e1e1d
src/components/primitives/Select/Select.tsx
borderRadius={resolvedProps.borderRadius}
<mask> <Box <mask> borderWidth={1} <mask> borderColor="transparent" <mask> {...layoutProps} <mask> borderRadius={themeProps.borderRadius} <mask> {...(isFocusVisible ? themeProps._focus : {})} <mask> ref={wrapperRef} <mask> > <mask> {Platform.OS === 'web' ? ( <mask> <> <mask> <Box w="100%" h="100%" position="absolute" opacity="0" zIndex={1}> </s> feat: new prop resolution changes in select </s> remove {...(isHovered ? themeProps._hover : {})} </s> add </s> remove const Select = ( { </s> add const Select = ({ wrapperRef, ...props }: ISelectProps, ref: any) => { const selectProps = useFormControl({ isDisabled: props.isDisabled, nativeID: props.nativeID, }); const isDisabled = selectProps.disabled; const tempFix = '__NativebasePlaceholder__'; const _ref = React.useRef(null); const [isOpen, setIsOpen] = React.useState<boolean>(false); const { focusProps, isFocusVisible } = useFocusRing(); const { hoverProps, isHovered } = useHover({ isDisabled }, _ref); const { </s> remove let itemsList: Array<{ label: string; value: string }> = React.Children.map( </s> add const itemsList: Array<{ label: string; value: string }> = React.Children.map( </s> remove const isDisabled = selectProps.disabled; const tempFix = '__NativebasePlaceholder__'; const _ref = React.useRef(null); const themeProps = usePropsResolution('Input', { ...props, size }); let [isOpen, setIsOpen] = React.useState<boolean>(false); const { focusProps, isFocusVisible } = useFocusRing(); const { hoverProps, isHovered } = useHover({ isDisabled }, _ref); </s> add </s> remove wrapperRef, ...props }: ISelectProps, ref: any ) => { const selectProps = useFormControl({ isDisabled: props.isDisabled, nativeID: props.nativeID, </s> add size, ...resolvedProps } = usePropsResolution('Input', props, { isDisabled, isHovered, isFocusVisible,
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b64de4e38452ea96659579941adbd7782a1e1e1d
src/components/primitives/Select/Select.tsx
MoonIcon,
<mask> Box, <mask> NativeBaseProvider, <mask> useColorMode, <mask> IconButton, <mask> Icon, <mask> ColorMode, <mask> useColorModeValue, <mask> } from 'native-base'; <mask> import type { StorageManager } from 'native-base'; <mask> import { Button } from 'react-native'; </s> feat: added custom icons and update componennts to support it </s> remove import { Alert, Box, Icon, IconButton } from 'native-base'; </s> add import { Alert, Box, CloseIcon, IconButton } from 'native-base'; </s> remove import { Icon } from 'native-base'; </s> add import { Icon, MoonIcon, SunIcon, CircleIcon } from 'native-base'; import { G, Polygon } from 'react-native-svg'; import { Ionicons } from '@expo/vector-icons'; </s> remove import { VStack, Box, Icon } from '../../primitives'; </s> add import { VStack, Box } from '../../primitives'; </s> remove Icon, </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
example/storybook/stories/components/Wrapper.tsx
SunIcon,
<mask> MoonIcon, <mask> ColorMode, <mask> useColorModeValue, <mask> } from 'native-base'; <mask> import type { StorageManager } from 'native-base'; <mask> import { Button } from 'react-native'; <mask> import AsyncStorage from '@react-native-async-storage/async-storage'; </s> feat: added custom icons and update componennts to support it </s> remove Icon, </s> add MoonIcon, </s> remove import { Icon } from 'native-base'; </s> add import { Icon, MoonIcon, SunIcon, CircleIcon } from 'native-base'; import { G, Polygon } from 'react-native-svg'; import { Ionicons } from '@expo/vector-icons'; </s> remove import { Alert, Box, Icon, IconButton } from 'native-base'; </s> add import { Alert, Box, CloseIcon, IconButton } from 'native-base'; </s> remove import Icon from '../../primitives/Icon'; </s> add import { CloseIcon } from '../../primitives/Icon/Icons'; </s> remove import Icon from '../Icon'; </s> add
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
example/storybook/stories/components/Wrapper.tsx
icon={colorMode === 'dark' ? <SunIcon /> : <MoonIcon />}
<mask> position="absolute" <mask> top={12} <mask> right={8} <mask> onPress={toggleColorMode} <mask> icon={ <mask> <Icon <mask> name={colorMode === 'dark' ? 'light-up' : 'md-moon'} <mask> type={colorMode === 'dark' ? 'Entypo' : 'Ionicons'} <mask> color={colorMode === 'dark' ? 'white' : 'black'} <mask> /> <mask> } <mask> /> <mask> {children} <mask> </Box> <mask> ); <mask> } </s> feat: added custom icons and update componennts to support it </s> remove return ( <Icon ml={-1} type="Entypo" name={type === 'increase' ? 'triangle-up' : 'triangle-down'} color={type === 'increase' ? 'green.500' : 'red.500'} size={8} {...props} ref={ref} /> </s> add return type === 'increase' ? ( <ChevronUpIcon ml={-1} color="green.500" size={8} {...props} ref={ref} /> ) : ( <ChevronDownIcon ml={-1} color="red.500" size={8} {...props} ref={ref} /> </s> remove <Icon name="circle" {..._icon} size={iconSize} opacity={checked ? 1 : 0} /> </s> add <CircleIcon {..._icon} size={iconSize} opacity={checked ? 1 : 0} /> </s> remove size={newProps._text.fontSize} </s> add // size={newProps._text.fontSize} size="sm" </s> remove <Icon name="arrow-drop-down" type="MaterialIcons" color={iconColor} /> </s> add <ChevronDownIcon color={iconColor} /> </s> remove dropdownIcon ? dropdownIcon : <Icon {...customDropdownIconProps} /> </s> add dropdownIcon ? ( dropdownIcon ) : ( <ChevronDownIcon {...customDropdownIconProps} /> )
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
example/storybook/stories/components/Wrapper.tsx
import { Alert, Box, CloseIcon, IconButton } from 'native-base';
<mask> import React from 'react'; <mask> import { Alert, Box, Icon, IconButton } from 'native-base'; <mask> import { select } from '@storybook/addon-knobs'; <mask> <mask> export default function () { <mask> return ( <mask> <Box mx={3} w="90%"> </s> feat: added custom icons and update componennts to support it </s> remove import { Icon } from 'native-base'; </s> add import { Icon, MoonIcon, SunIcon, CircleIcon } from 'native-base'; import { G, Polygon } from 'react-native-svg'; import { Ionicons } from '@expo/vector-icons'; </s> remove Icon, </s> add MoonIcon, </s> remove import Icon from '../../primitives/Icon'; </s> add import { CloseIcon } from '../../primitives/Icon/Icons'; </s> remove export { default as Icon, createIcon } from './Icon'; </s> add export { Icon, createIcon } from './Icon'; </s> remove import { VStack, Box, Icon } from '../../primitives'; </s> add import { VStack, Box } from '../../primitives';
[ "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
example/storybook/stories/components/composites/Alert/knobEnabled.tsx
action={<IconButton icon={<CloseIcon size="xxs" />} />}
<mask> 'variant', <mask> ['left-accent', 'solid', 'subtle', 'top-accent'], <mask> 'subtle' <mask> )} <mask> action={ <mask> <IconButton icon={<Icon name="close" color="gray.400" size="md" />} /> <mask> } <mask> actionProps={{ alignSelf: 'center' }} <mask> > <mask> <Alert.Icon /> <mask> <Alert.Title>Error Alert</Alert.Title> <mask> <Alert.Description>Description </Alert.Description> </s> feat: added custom icons and update componennts to support it </s> remove icon={<Icon name="close" {..._icon} />} </s> add icon={<CloseIcon {..._icon} />} </s> remove icon={<Icon name="close" size="xs" />} </s> add icon={<CloseIcon size="xxs" />} </s> remove <Icon name="arrow-drop-down" type="MaterialIcons" color={iconColor} /> </s> add <ChevronDownIcon color={iconColor} /> </s> remove <Icon name="check" </s> add <CheckIcon </s> remove <Icon name="circle" </s> add <CircleIcon
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
example/storybook/stories/components/composites/Alert/knobEnabled.tsx
import { Icon, MoonIcon, SunIcon, CircleIcon } from 'native-base'; import { G, Polygon } from 'react-native-svg'; import { Ionicons } from '@expo/vector-icons';
<mask> import React from 'react'; <mask> import { Icon } from 'native-base'; <mask> <mask> export default function () { <mask> return ( <mask> <> <mask> <Icon name="check" /> </s> feat: added custom icons and update componennts to support it </s> remove import { Alert, Box, Icon, IconButton } from 'native-base'; </s> add import { Alert, Box, CloseIcon, IconButton } from 'native-base'; </s> remove <Icon name="check" /> </s> add <Icon> <G fill="currentColor"> <Polygon points="5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039" /> </G> </Icon> <MoonIcon m={8} /> <CircleIcon color="red.200" /> <SunIcon /> <Icon color="red.500" m={8} as="A" /> <Icon color="red.500" m={8} as={Ionicons} /> </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon'; </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon'; </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon';
[ "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
example/storybook/stories/components/primitives/Icon/Basic.tsx
<Icon> <G fill="currentColor"> <Polygon points="5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039" /> </G> </Icon> <MoonIcon m={8} /> <CircleIcon color="red.200" /> <SunIcon /> <Icon color="red.500" m={8} as="A" /> <Icon color="red.500" m={8} as={Ionicons} />
<mask> <mask> export default function () { <mask> return ( <mask> <> <mask> <Icon name="check" /> <mask> </> <mask> ); <mask> } </s> feat: added custom icons and update componennts to support it </s> remove import { Icon } from 'native-base'; </s> add import { Icon, MoonIcon, SunIcon, CircleIcon } from 'native-base'; import { G, Polygon } from 'react-native-svg'; import { Ionicons } from '@expo/vector-icons'; </s> remove import { Alert, Box, Icon, IconButton } from 'native-base'; </s> add import { Alert, Box, CloseIcon, IconButton } from 'native-base'; </s> remove const getDefaultIcon = () => { return ( <G strokeWidth={1.5} stroke="currentColor"> <Path d={'M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25'} fill="none" /> <Path d={'M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0'} fill="none" /> <Circle cx="12" cy="12" r="11.25" fill="none" /> </G> ); }; </s> add </s> remove <Icon name={'chevron-small-up'} color="white" type="Entypo" {...newProps} ref={ref} /> </s> add <ChevronUpIcon color="white" {...newProps} ref={ref} /> </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon';
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
example/storybook/stories/components/primitives/Icon/Basic.tsx
<Icon viewBox="0 0 870 873">
<mask> import { Icon } from 'native-base'; <mask> import { Path, G } from 'react-native-svg'; <mask> export default function () { <mask> return ( <mask> <Icon width="870px" height="873px" viewBox="0 0 870 873"> <mask> <G fillRule="nonzero" stroke="none" strokeWidth={1} fill="none"> <mask> <Path <mask> d="M435 .1C194.8.1.1 194.8.1 435c0 187.3 118.4 346.9 284.4 408.1 3.3-29.9 15-57.2 32.7-79.6 12.1-15.4 26.9-28.5 43.9-38.4 2.1-5 4.6-10.6 7.1-16.6-50.3-26-84.7-78.1-84.7-138.6 0-51.7 25.3-97.7 64-125.9-10.9-20.6-21.3-40.2-31.8-58.2-18.1-31.5-46.7-59.7-68.4-78.9-21 11.9-47.8 4.7-59.7-16.3-11.9-21-4.7-47.8 16.3-59.7 21-11.9 47.4-4.7 59.7 15.9v.4c7.2 12.7 7.2 27.5 1.8 39.8 22.8 19.5 56.8 52.5 77.8 89 9.8 17 19.5 34.7 29.3 53.5 20.3-9.4 42.7-14.8 66.2-14.8 21.3 0 41.6 4.3 60.1 11.9 9.8-18.5 19.5-36.2 28.9-52.8 21-36.2 54.6-68.7 77.4-88.3-5.4-12.3-5.4-26.8 1.8-39.4v-.4c12.3-20.6 38.7-27.9 59.3-15.9 21 11.9 28.2 38.7 16.3 59.3-11.9 21-38.4 28.2-59.3 16.3-21.7 18.8-49.9 47.4-68 78.5-10.1 17.4-20.3 36.5-30.8 56.4 42 27.9 69.8 75.3 69.8 129.5 0 63-36.9 116.9-90.4 141.5.9 2.7 2 4.9 3 7.2 47 22.3 81.1 67.4 87.9 121.1C755.9 776 869.9 618.8 869.9 435 869.9 194.8 675.2.1 435 .1z" <mask> fill="#CA0000" <mask> /> </s> feat: added custom icons and update componennts to support it </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon'; </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon'; </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon'; </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon'; </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon';
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
example/storybook/stories/components/primitives/Icon/CustomIcon.tsx
import AllIcons from './AllIcons';
<mask> import Wrapper from './../../Wrapper'; <mask> import Basic from './Basic'; <mask> import CustomIcon from './CustomIcon'; <mask> import CreateIcon from './CreateIcon'; <mask> <mask> storiesOf('Icon', module) <mask> .addDecorator(withKnobs) </s> feat: added custom icons and update componennts to support it </s> remove import Icon from '../Icon'; </s> add </s> remove import Icon from '../Icon'; </s> add </s> remove import Icon from '../Icon'; </s> add </s> remove import Icon from '../Icon'; </s> add
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
example/storybook/stories/components/primitives/Icon/index.tsx
.add('All Icons', () => <AllIcons />)
<mask> storiesOf('Icon', module) <mask> .addDecorator(withKnobs) <mask> .addDecorator((getStory: any) => <Wrapper>{getStory()}</Wrapper>) <mask> .add('Basic', () => <Basic />) <mask> .add('CustomIcon', () => <CustomIcon />) <mask> .add('CreateIcon', () => <CreateIcon />); </s> feat: added custom icons and update componennts to support it </s> remove const getIconName = () => { </s> add const getIcon = () => { </s> remove const getDefaultIcon = () => { return ( <G strokeWidth={1.5} stroke="currentColor"> <Path d={'M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25'} fill="none" /> <Path d={'M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0'} fill="none" /> <Circle cx="12" cy="12" r="11.25" fill="none" /> </G> ); }; </s> add </s> remove return 'error'; </s> add return <WarningTwoIcon color={iconColor} {...newProps} ref={ref} />; </s> remove style={style} </s> add // style={style}
[ "keep", "keep", "add", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
example/storybook/stories/components/primitives/Icon/index.tsx
import { ChevronDownIcon, ChevronUpIcon } from '../../primitives/Icon/Icons';
<mask> import React from 'react'; <mask> import Icon from '../../primitives/Icon'; <mask> import type { IAccordionIconProps, IAccordionItemContextProps } from './types'; <mask> import { AccordionItemContext } from './Context'; <mask> import { useThemeProps } from '../../../hooks'; <mask> <mask> const AccordionIcon = ({ ...props }: IAccordionIconProps, ref?: any) => { </s> feat: added custom icons and update componennts to support it </s> remove import Icon from '../../primitives/Icon'; </s> add import { CloseIcon } from '../../primitives/Icon/Icons'; </s> remove import Icon, { IIconProps } from '../../primitives/Icon'; </s> add import { Icon, IIconProps } from '../../primitives/Icon'; </s> remove import { VStack, Box, Icon } from '../../primitives'; </s> add import { VStack, Box } from '../../primitives';
[ "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/composites/Accordion/AccordionIcon.tsx
<ChevronUpIcon color="white" {...newProps} ref={ref} />
<mask> AccordionItemContext <mask> ); <mask> const { ...newProps } = useThemeProps('AccordionIcon', props); <mask> return isOpen ? ( <mask> <Icon <mask> name={'chevron-small-up'} <mask> color="white" <mask> type="Entypo" <mask> {...newProps} <mask> ref={ref} <mask> /> <mask> ) : ( <mask> <Icon name={'chevron-small-down'} type="Entypo" {...newProps} ref={ref} /> <mask> ); <mask> }; <mask> </s> feat: added custom icons and update componennts to support it </s> remove <Icon name={'chevron-small-down'} type="Entypo" {...newProps} ref={ref} /> </s> add <ChevronDownIcon {...newProps} ref={ref} /> </s> remove return ( <Icon ml={-1} type="Entypo" name={type === 'increase' ? 'triangle-up' : 'triangle-down'} color={type === 'increase' ? 'green.500' : 'red.500'} size={8} {...props} ref={ref} /> </s> add return type === 'increase' ? ( <ChevronUpIcon ml={-1} color="green.500" size={8} {...props} ref={ref} /> ) : ( <ChevronDownIcon ml={-1} color="red.500" size={8} {...props} ref={ref} /> </s> remove {children || ( <Icon name={getIconName()} color={iconColor} {...newProps} ref={ref} /> )} </s> add {children || getIcon()} </s> remove <Icon name="arrow-drop-down" type="MaterialIcons" color={iconColor} /> </s> add <ChevronDownIcon color={iconColor} /> </s> remove import React from 'react'; import { border, color, flexbox, layout, space, typography, position, } from 'styled-system'; import { customBorder, customBackground, customOutline, customLayout, customExtra, customShadow, customTypography, customPosition, } from '../../../utils/customProps'; import styled from 'styled-components/native'; import { usePropsResolution } from '../../../hooks/useThemeProps'; import { AntDesign, Entypo, EvilIcons, Feather, FontAwesome, FontAwesome5, Fontisto, Foundation, Ionicons, MaterialCommunityIcons, MaterialIcons, Octicons, SimpleLineIcons, Zocial, } from '@expo/vector-icons'; import type { IIconProps, IconType, IconNameType } from './types'; import SVGIcon from './SVGIcon'; const componentMap = { AntDesign, Entypo, EvilIcons, Feather, FontAwesome, FontAwesome5, Fontisto, Foundation, Ionicons, MaterialCommunityIcons, MaterialIcons, Octicons, SimpleLineIcons, Zocial, }; let memoizedStyledIcons: any = {}; function getStyledIconComponent(type: IconType) { if (!memoizedStyledIcons[type]) { memoizedStyledIcons[type] = styled(componentMap[type])<IIconProps>( color, space, layout, flexbox, border, typography, position, customPosition, customBorder, customBackground, customOutline, customShadow, customExtra, customLayout, customTypography ); } return memoizedStyledIcons[type]; } const Icon = ({ type, name, style, ...props }: IIconProps, ref?: any) => { const { size, ...newProps } = usePropsResolution('Icon', props); if (!name) { return <SVGIcon ref={ref} {...props} style={style} />; } const Component = getStyledIconComponent(type ?? 'MaterialIcons'); return ( <Component name={name} {...newProps} ref={ref} style={[style, { fontSize: parseInt(size, 10) }]} /> ); }; export type { IIconProps, IconType, IconNameType }; </s> add export { default as Icon } from './Icon';
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/composites/Accordion/AccordionIcon.tsx
<ChevronDownIcon {...newProps} ref={ref} />
<mask> {...newProps} <mask> ref={ref} <mask> /> <mask> ) : ( <mask> <Icon name={'chevron-small-down'} type="Entypo" {...newProps} ref={ref} /> <mask> ); <mask> }; <mask> <mask> export default React.memo(React.forwardRef(AccordionIcon)); </s> feat: added custom icons and update componennts to support it </s> remove <Icon name={'chevron-small-up'} color="white" type="Entypo" {...newProps} ref={ref} /> </s> add <ChevronUpIcon color="white" {...newProps} ref={ref} /> </s> remove {children || ( <Icon name={getIconName()} color={iconColor} {...newProps} ref={ref} /> )} </s> add {children || getIcon()} </s> remove return ( <Icon ml={-1} type="Entypo" name={type === 'increase' ? 'triangle-up' : 'triangle-down'} color={type === 'increase' ? 'green.500' : 'red.500'} size={8} {...props} ref={ref} /> </s> add return type === 'increase' ? ( <ChevronUpIcon ml={-1} color="green.500" size={8} {...props} ref={ref} /> ) : ( <ChevronDownIcon ml={-1} color="red.500" size={8} {...props} ref={ref} /> </s> remove return 'check-circle'; </s> add return <CheckCircleIcon color={iconColor} {...newProps} ref={ref} />; </s> remove getDefaultIcon() </s> add <QuestionOutlineIcon />
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/composites/Accordion/AccordionIcon.tsx
import { Box } from '../../primitives'; import { WarningIcon, WarningTwoIcon, InfoIcon, CheckCircleIcon, } from '../../primitives/Icon/Icons';
<mask> import React from 'react'; <mask> import { Box, Icon } from '../../primitives'; <mask> import type { IAlertContext } from './index'; <mask> import { usePropsResolution } from '../../../hooks/useThemeProps'; <mask> import { AlertContext } from './Context'; <mask> import { omitUndefined } from '../../../theme/tools/utils'; <mask> </s> feat: added custom icons and update componennts to support it </s> remove import { VStack, Box, Icon } from '../../primitives'; </s> add import { VStack, Box } from '../../primitives'; </s> remove import { Icon, Box } from '../../primitives'; </s> add import { Box } from '../../primitives'; import { CheckIcon } from '../../primitives/Icon/Icons'; </s> remove import Icon from '../Icon'; </s> add </s> remove import Icon from '../Icon'; </s> add </s> remove import Icon from '../Icon'; </s> add
[ "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/composites/Alert/AlertIcon.tsx
const getIcon = () => {
<mask> const AlertIcon = ({ children, wrapperRef, ...props }: any, ref?: any) => { <mask> let newProps = usePropsResolution('AlertIcon', props); <mask> newProps = omitUndefined(newProps); <mask> const { status, iconColor }: IAlertContext = React.useContext(AlertContext); <mask> const getIconName = () => { <mask> switch (status) { <mask> case 'error': <mask> return 'error'; <mask> case 'warning': <mask> return 'warning'; </s> feat: added custom icons and update componennts to support it </s> remove return 'error'; </s> add return <WarningTwoIcon color={iconColor} {...newProps} ref={ref} />; </s> remove return 'warning'; </s> add return <WarningIcon color={iconColor} {...newProps} ref={ref} />; </s> remove const SVGIcon = ( { viewBox, color: colorProp, stroke, strokeWidth, children, focusable, size, style, }: IIconProps, ref: any ) => { const newProps = usePropsResolution('Icon', { size }); let strokeColor = useToken('colors', stroke || ''); colorProp = useToken('colors', colorProp || 'primary.400'); </s> add const SVGIcon = ({ children, ...props }: IIconProps, ref: any) => { const { stroke, color, ...resolvedProps } = usePropsResolution('Icon', props); const strokeHex = useToken('colors', stroke || ''); const colorHex = useToken('colors', color || '');
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/composites/Alert/AlertIcon.tsx
return <WarningTwoIcon color={iconColor} {...newProps} ref={ref} />;
<mask> const { status, iconColor }: IAlertContext = React.useContext(AlertContext); <mask> const getIconName = () => { <mask> switch (status) { <mask> case 'error': <mask> return 'error'; <mask> case 'warning': <mask> return 'warning'; <mask> case 'success': <mask> return 'check-circle'; <mask> default: </s> feat: added custom icons and update componennts to support it </s> remove const getIconName = () => { </s> add const getIcon = () => { </s> remove return 'warning'; </s> add return <WarningIcon color={iconColor} {...newProps} ref={ref} />; </s> remove return 'check-circle'; </s> add return <CheckCircleIcon color={iconColor} {...newProps} ref={ref} />; </s> remove return 'info'; </s> add return <InfoIcon color={iconColor} {...newProps} ref={ref} />; </s> remove const SVGIcon = ( { viewBox, color: colorProp, stroke, strokeWidth, children, focusable, size, style, }: IIconProps, ref: any ) => { const newProps = usePropsResolution('Icon', { size }); let strokeColor = useToken('colors', stroke || ''); colorProp = useToken('colors', colorProp || 'primary.400'); </s> add const SVGIcon = ({ children, ...props }: IIconProps, ref: any) => { const { stroke, color, ...resolvedProps } = usePropsResolution('Icon', props); const strokeHex = useToken('colors', stroke || ''); const colorHex = useToken('colors', color || '');
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/composites/Alert/AlertIcon.tsx
return <WarningIcon color={iconColor} {...newProps} ref={ref} />;
<mask> switch (status) { <mask> case 'error': <mask> return 'error'; <mask> case 'warning': <mask> return 'warning'; <mask> case 'success': <mask> return 'check-circle'; <mask> default: <mask> return 'info'; <mask> } </s> feat: added custom icons and update componennts to support it </s> remove return 'error'; </s> add return <WarningTwoIcon color={iconColor} {...newProps} ref={ref} />; </s> remove return 'check-circle'; </s> add return <CheckCircleIcon color={iconColor} {...newProps} ref={ref} />; </s> remove return 'info'; </s> add return <InfoIcon color={iconColor} {...newProps} ref={ref} />; </s> remove const getIconName = () => { </s> add const getIcon = () => { </s> remove import { Alert, Box, Icon, IconButton } from 'native-base'; </s> add import { Alert, Box, CloseIcon, IconButton } from 'native-base';
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/composites/Alert/AlertIcon.tsx
return <CheckCircleIcon color={iconColor} {...newProps} ref={ref} />;
<mask> return 'error'; <mask> case 'warning': <mask> return 'warning'; <mask> case 'success': <mask> return 'check-circle'; <mask> default: <mask> return 'info'; <mask> } <mask> }; <mask> </s> feat: added custom icons and update componennts to support it </s> remove return 'warning'; </s> add return <WarningIcon color={iconColor} {...newProps} ref={ref} />; </s> remove return 'error'; </s> add return <WarningTwoIcon color={iconColor} {...newProps} ref={ref} />; </s> remove return 'info'; </s> add return <InfoIcon color={iconColor} {...newProps} ref={ref} />; </s> remove const getIconName = () => { </s> add const getIcon = () => { </s> remove <Icon name={'chevron-small-up'} color="white" type="Entypo" {...newProps} ref={ref} /> </s> add <ChevronUpIcon color="white" {...newProps} ref={ref} />
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/composites/Alert/AlertIcon.tsx
return <InfoIcon color={iconColor} {...newProps} ref={ref} />;
<mask> return 'warning'; <mask> case 'success': <mask> return 'check-circle'; <mask> default: <mask> return 'info'; <mask> } <mask> }; <mask> <mask> // TODO: Refactor this and move alignSelf to Icon component. <mask> return ( </s> feat: added custom icons and update componennts to support it </s> remove {children || ( <Icon name={getIconName()} color={iconColor} {...newProps} ref={ref} /> )} </s> add {children || getIcon()} </s> remove return 'check-circle'; </s> add return <CheckCircleIcon color={iconColor} {...newProps} ref={ref} />; </s> remove return 'warning'; </s> add return <WarningIcon color={iconColor} {...newProps} ref={ref} />; </s> remove return 'error'; </s> add return <WarningTwoIcon color={iconColor} {...newProps} ref={ref} />; </s> remove <Icon name="check" </s> add <CheckIcon // TODO: Needs to update, with _icon (_prop) [Instead of passsing p here.]
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/composites/Alert/AlertIcon.tsx
{children || getIcon()}
<mask> <mask> // TODO: Refactor this and move alignSelf to Icon component. <mask> return ( <mask> <Box alignSelf="center" ref={wrapperRef}> <mask> {children || ( <mask> <Icon name={getIconName()} color={iconColor} {...newProps} ref={ref} /> <mask> )} <mask> </Box> <mask> ); <mask> }; <mask> export default React.memo(React.forwardRef(AlertIcon)); </s> feat: added custom icons and update componennts to support it </s> remove return 'info'; </s> add return <InfoIcon color={iconColor} {...newProps} ref={ref} />; </s> remove <Icon name="arrow-drop-down" type="MaterialIcons" color={iconColor} /> </s> add <ChevronDownIcon color={iconColor} /> </s> remove <Icon name={'chevron-small-down'} type="Entypo" {...newProps} ref={ref} /> </s> add <ChevronDownIcon {...newProps} ref={ref} /> </s> remove <Icon name="arrow-drop-up" type="MaterialIcons" color={iconColor} /> </s> add <ChevronUpIcon color={iconColor} /> </s> remove <Icon name={'chevron-small-up'} color="white" type="Entypo" {...newProps} ref={ref} /> </s> add <ChevronUpIcon color="white" {...newProps} ref={ref} />
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/composites/Alert/AlertIcon.tsx
import { Box } from '../../primitives'; import { CheckIcon } from '../../primitives/Icon/Icons';
<mask> import React from 'react'; <mask> import { Icon, Box } from '../../primitives'; <mask> import { usePropsResolution } from '../../../hooks/useThemeProps'; <mask> import { MenuItem } from './MenuItem'; <mask> import type { IMenuItemOptionProps, IMenuOptionContextProps } from './types'; <mask> import { MenuOptionContext } from './MenuOptionGroup'; <mask> import { useMenuOptionItem } from './useMenu'; </s> feat: added custom icons and update componennts to support it </s> remove import { Box, Icon } from '../../primitives'; </s> add import { Box } from '../../primitives'; import { WarningIcon, WarningTwoIcon, InfoIcon, CheckCircleIcon, } from '../../primitives/Icon/Icons'; </s> remove import Icon from '../Icon'; </s> add </s> remove import Icon from '../Icon'; </s> add </s> remove import Icon from '../Icon'; </s> add </s> remove import { VStack, Box, Icon } from '../../primitives'; </s> add import { VStack, Box } from '../../primitives';
[ "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/composites/Menu/MenuItemOption.tsx
<CheckIcon // TODO: Needs to update, with _icon (_prop) [Instead of passsing p here.]
<mask> alignItems="center" <mask> justifyContent="flex-start" <mask> width="100%" <mask> > <mask> <Icon <mask> name="check" <mask> pr={newProps.p} <mask> size={newProps._text.fontSize} <mask> opacity={isChecked ? 1 : 0} <mask> /> <mask> {children} </s> feat: added custom icons and update componennts to support it </s> remove size={newProps._text.fontSize} </s> add // size={newProps._text.fontSize} size="sm" </s> remove <Icon name="circle" {..._icon} size={iconSize} opacity={checked ? 1 : 0} /> </s> add <CircleIcon {..._icon} size={iconSize} opacity={checked ? 1 : 0} /> </s> remove <Icon </s> add <CheckIcon </s> remove <Icon name="check" </s> add <CheckIcon </s> remove <Icon name="circle" </s> add <CircleIcon
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/composites/Menu/MenuItemOption.tsx
// size={newProps._text.fontSize} size="sm"
<mask> > <mask> <Icon <mask> name="check" <mask> pr={newProps.p} <mask> size={newProps._text.fontSize} <mask> opacity={isChecked ? 1 : 0} <mask> /> <mask> {children} <mask> </Box> <mask> </MenuItem> </s> feat: added custom icons and update componennts to support it </s> remove <Icon name="check" </s> add <CheckIcon // TODO: Needs to update, with _icon (_prop) [Instead of passsing p here.] </s> remove <Icon name="circle" {..._icon} size={iconSize} opacity={checked ? 1 : 0} /> </s> add <CircleIcon {..._icon} size={iconSize} opacity={checked ? 1 : 0} /> </s> remove <Icon </s> add <CheckIcon </s> remove <Icon name="check" </s> add <CheckIcon </s> remove <Icon name="circle" </s> add <CircleIcon
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/composites/Menu/MenuItemOption.tsx
import { CloseIcon } from '../../primitives/Icon/Icons';
<mask> import React from 'react'; <mask> import { ModalContext } from './Context'; <mask> import { useThemeProps } from '../../../hooks'; <mask> import { IconButton } from '..'; <mask> import Icon from '../../primitives/Icon'; <mask> import type { IIconButtonProps } from 'native-base'; <mask> <mask> const ModalCloseButton = (props: Omit<IIconButtonProps, 'icon'>, ref?: any) => { <mask> const newProps = useThemeProps('ModalCloseButton', props); <mask> const { _icon, ...rest } = newProps; </s> feat: added custom icons and update componennts to support it </s> remove import Icon from '../../primitives/Icon'; </s> add import { CloseIcon } from '../../primitives/Icon/Icons'; </s> remove import Icon from '../../primitives/Icon'; </s> add import { ChevronDownIcon, ChevronUpIcon } from '../../primitives/Icon/Icons'; </s> remove import Icon, { IIconProps } from '../../primitives/Icon'; </s> add import { Icon, IIconProps } from '../../primitives/Icon'; </s> remove import { IIconProps, default as Icon } from '../Icon'; </s> add import { IIconProps, Icon } from '../Icon';
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/composites/Modal/ModalCloseButton.tsx
icon={<CloseIcon {..._icon} />}
<mask> const { toggleVisible, toggleOnClose } = React.useContext(ModalContext); <mask> return ( <mask> <IconButton <mask> accessibilityLabel="Close dialog" <mask> icon={<Icon name="close" {..._icon} />} <mask> {...rest} <mask> onPress={() => { <mask> toggleVisible(false); <mask> toggleOnClose(false); <mask> }} </s> feat: added custom icons and update componennts to support it </s> remove action={ <IconButton icon={<Icon name="close" color="gray.400" size="md" />} /> } </s> add action={<IconButton icon={<CloseIcon size="xxs" />} />} </s> remove icon={<Icon name="close" size="xs" />} </s> add icon={<CloseIcon size="xxs" />} </s> remove const getIconName = () => { </s> add const getIcon = () => {
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/composites/Modal/ModalCloseButton.tsx
import { VStack, Box } from '../../primitives';
<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, INumberInputContext } from './types'; <mask> import { NumberInputContext } from './Context'; <mask> <mask> export const NBStepper = React.forwardRef( </s> feat: added custom icons and update componennts to support it </s> remove import { Box, Icon } from '../../primitives'; </s> add import { Box } from '../../primitives'; import { WarningIcon, WarningTwoIcon, InfoIcon, CheckCircleIcon, } from '../../primitives/Icon/Icons'; </s> remove import Icon from '../../primitives/Icon'; </s> add import { ChevronDownIcon, ChevronUpIcon } from '../../primitives/Icon/Icons'; </s> remove import Icon from '../../primitives/Icon'; </s> add import { CloseIcon } from '../../primitives/Icon/Icons'; </s> remove import Icon from '../Icon'; </s> add
[ "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/composites/NumberInput/NumberInputStepper.tsx
import { ChevronUpIcon, ChevronDownIcon } from '../../primitives/Icon/Icons';
<mask> import { useThemeProps } from '../../../hooks'; <mask> import type { INumberInputSteppersProps, INumberInputContext } from './types'; <mask> import { NumberInputContext } from './Context'; <mask> <mask> export const NBStepper = React.forwardRef( <mask> ({ children, ...props }: any, ref?: any) => { <mask> const { <mask> style, </s> feat: added custom icons and update componennts to support it </s> remove import { VStack, Box, Icon } from '../../primitives'; </s> add import { VStack, Box } from '../../primitives'; </s> remove import Icon from '../../primitives/Icon'; </s> add import { ChevronDownIcon, ChevronUpIcon } from '../../primitives/Icon/Icons'; </s> remove import Icon from '../../primitives/Icon'; </s> add import { CloseIcon } from '../../primitives/Icon/Icons'; </s> remove import Icon, { IIconProps } from '../../primitives/Icon'; </s> add import { Icon, IIconProps } from '../../primitives/Icon';
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/composites/NumberInput/NumberInputStepper.tsx
<ChevronUpIcon color={iconColor} />
<mask> } <mask> : {})} <mask> > <mask> {children || isIncrement ? ( <mask> <Icon name="arrow-drop-up" type="MaterialIcons" color={iconColor} /> <mask> ) : ( <mask> <Icon <mask> name="arrow-drop-down" <mask> type="MaterialIcons" <mask> color={iconColor} </s> feat: added custom icons and update componennts to support it </s> remove <Icon name="arrow-drop-down" type="MaterialIcons" color={iconColor} /> </s> add <ChevronDownIcon color={iconColor} /> </s> remove dropdownIcon ? dropdownIcon : <Icon {...customDropdownIconProps} /> </s> add dropdownIcon ? ( dropdownIcon ) : ( <ChevronDownIcon {...customDropdownIconProps} /> ) </s> remove {children || ( <Icon name={getIconName()} color={iconColor} {...newProps} ref={ref} /> )} </s> add {children || getIcon()} </s> remove <Icon </s> add <CheckIcon </s> remove <Icon name="circle" </s> add <CircleIcon
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/composites/NumberInput/NumberInputStepper.tsx
<ChevronDownIcon color={iconColor} />
<mask> > <mask> {children || isIncrement ? ( <mask> <Icon name="arrow-drop-up" type="MaterialIcons" color={iconColor} /> <mask> ) : ( <mask> <Icon <mask> name="arrow-drop-down" <mask> type="MaterialIcons" <mask> color={iconColor} <mask> /> <mask> )} <mask> </Box> <mask> </TouchableOpacity> <mask> ); <mask> } </s> feat: added custom icons and update componennts to support it </s> remove <Icon name="arrow-drop-up" type="MaterialIcons" color={iconColor} /> </s> add <ChevronUpIcon color={iconColor} /> </s> remove {children || ( <Icon name={getIconName()} color={iconColor} {...newProps} ref={ref} /> )} </s> add {children || getIcon()} </s> remove <Icon name="circle" {..._icon} size={iconSize} opacity={checked ? 1 : 0} /> </s> add <CircleIcon {..._icon} size={iconSize} opacity={checked ? 1 : 0} /> </s> remove <Icon name="circle" </s> add <CircleIcon </s> remove <Icon name="check" </s> add <CheckIcon
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/composites/NumberInput/NumberInputStepper.tsx
import { CloseIcon } from '../../primitives/Icon/Icons';
<mask> import React from 'react'; <mask> import { useThemeProps } from '../../../hooks'; <mask> import Box from '../../primitives/Box'; <mask> import { default as IconButton, IIconButtonProps } from '../IconButton'; <mask> import Icon from '../../primitives/Icon'; <mask> import { PopoverContext } from './PopoverContext'; <mask> <mask> const PopoverCloseButton = ( <mask> props: Omit<IIconButtonProps, 'icon'>, <mask> ref: any </s> feat: added custom icons and update componennts to support it </s> remove import Icon from '../../primitives/Icon'; </s> add import { CloseIcon } from '../../primitives/Icon/Icons'; </s> remove import Icon from '../../primitives/Icon'; </s> add import { ChevronDownIcon, ChevronUpIcon } from '../../primitives/Icon/Icons'; </s> remove import { VStack, Box, Icon } from '../../primitives'; </s> add import { VStack, Box } from '../../primitives'; </s> remove import Icon from '../Icon'; </s> add </s> remove import { IIconProps, default as Icon } from '../Icon'; </s> add import { IIconProps, Icon } from '../Icon';
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/composites/Popover/PopoverCloseButton.tsx
icon={<CloseIcon size="xxs" />}
<mask> <Box position="absolute" right={0} top={0} zIndex={1} ref={ref}> <mask> <IconButton <mask> {...style.popoverCloseButtonProps} <mask> {...props} <mask> icon={<Icon name="close" size="xs" />} <mask> onPress={onClose} <mask> /> <mask> </Box> <mask> ); <mask> }; </s> feat: added custom icons and update componennts to support it </s> remove action={ <IconButton icon={<Icon name="close" color="gray.400" size="md" />} /> } </s> add action={<IconButton icon={<CloseIcon size="xxs" />} />} </s> remove icon={<Icon name="close" {..._icon} />} </s> add icon={<CloseIcon {..._icon} />} </s> remove icon={ <Icon name={colorMode === 'dark' ? 'light-up' : 'md-moon'} type={colorMode === 'dark' ? 'Entypo' : 'Ionicons'} color={colorMode === 'dark' ? 'white' : 'black'} /> } </s> add icon={colorMode === 'dark' ? <SunIcon /> : <MoonIcon />} </s> remove {children || ( <Icon name={getIconName()} color={iconColor} {...newProps} ref={ref} /> )} </s> add {children || getIcon()} </s> remove return ( <Icon ml={-1} type="Entypo" name={type === 'increase' ? 'triangle-up' : 'triangle-down'} color={type === 'increase' ? 'green.500' : 'red.500'} size={8} {...props} ref={ref} /> </s> add return type === 'increase' ? ( <ChevronUpIcon ml={-1} color="green.500" size={8} {...props} ref={ref} /> ) : ( <ChevronDownIcon ml={-1} color="red.500" size={8} {...props} ref={ref} />
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/composites/Popover/PopoverCloseButton.tsx
<mask> Box, <mask> IBoxProps, <mask> Text, <mask> ITextProps, <mask> Icon, <mask> IIconProps, <mask> HStack, <mask> IStackProps, <mask> } from '../../primitives'; <mask> import { useThemeProps } from '../../../hooks'; </s> feat: added custom icons and update componennts to support it </s> remove import { VStack, Box, Icon } from '../../primitives'; </s> add import { VStack, Box } from '../../primitives'; </s> remove import { Box, Icon } from '../../primitives'; </s> add import { Box } from '../../primitives'; import { WarningIcon, WarningTwoIcon, InfoIcon, CheckCircleIcon, } from '../../primitives/Icon/Icons'; </s> remove import { Icon, Box } from '../../primitives'; </s> add import { Box } from '../../primitives'; import { CheckIcon } from '../../primitives/Icon/Icons'; </s> remove import { Alert, Box, Icon, IconButton } from 'native-base'; </s> add import { Alert, Box, CloseIcon, IconButton } from 'native-base';
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/composites/Stat/index.tsx
import { ChevronDownIcon, ChevronUpIcon } from '../../primitives/Icon/Icons';
<mask> IStackProps, <mask> } from '../../primitives'; <mask> import { useThemeProps } from '../../../hooks'; <mask> <mask> export const StatLabel = React.memo( <mask> React.forwardRef(({ style, ...props }: ITextProps, ref?: any) => { <mask> let newProps = useThemeProps('Stat', props); </s> feat: added custom icons and update componennts to support it </s> remove Icon, </s> add </s> remove import Icon from '../../primitives/Icon'; </s> add import { CloseIcon } from '../../primitives/Icon/Icons'; </s> remove import Icon from '../../primitives/Icon'; </s> add import { ChevronDownIcon, ChevronUpIcon } from '../../primitives/Icon/Icons'; </s> remove const getIconName = () => { </s> add const getIcon = () => {
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/composites/Stat/index.tsx
type IStatArrowProps = IIconProps & { type?: 'increase' | 'decrease' };
<mask> ); <mask> }) <mask> ); <mask> <mask> type IStatArrowProps = IIconProps | { type?: 'increase' | 'decrease' }; <mask> export const StatArrow = React.memo( <mask> React.forwardRef(({ type, ...props }: IStatArrowProps, ref?: any) => { <mask> return ( <mask> <Icon <mask> ml={-1} </s> feat: added custom icons and update componennts to support it </s> remove return ( <Icon ml={-1} type="Entypo" name={type === 'increase' ? 'triangle-up' : 'triangle-down'} color={type === 'increase' ? 'green.500' : 'red.500'} size={8} {...props} ref={ref} /> </s> add return type === 'increase' ? ( <ChevronUpIcon ml={-1} color="green.500" size={8} {...props} ref={ref} /> ) : ( <ChevronDownIcon ml={-1} color="red.500" size={8} {...props} ref={ref} /> </s> remove const getIconName = () => { </s> add const getIcon = () => { </s> remove import React from 'react'; import { border, color, flexbox, layout, space, typography, position, } from 'styled-system'; import { customBorder, customBackground, customOutline, customLayout, customExtra, customShadow, customTypography, customPosition, } from '../../../utils/customProps'; import styled from 'styled-components/native'; import { usePropsResolution } from '../../../hooks/useThemeProps'; import { AntDesign, Entypo, EvilIcons, Feather, FontAwesome, FontAwesome5, Fontisto, Foundation, Ionicons, MaterialCommunityIcons, MaterialIcons, Octicons, SimpleLineIcons, Zocial, } from '@expo/vector-icons'; import type { IIconProps, IconType, IconNameType } from './types'; import SVGIcon from './SVGIcon'; const componentMap = { AntDesign, Entypo, EvilIcons, Feather, FontAwesome, FontAwesome5, Fontisto, Foundation, Ionicons, MaterialCommunityIcons, MaterialIcons, Octicons, SimpleLineIcons, Zocial, }; let memoizedStyledIcons: any = {}; function getStyledIconComponent(type: IconType) { if (!memoizedStyledIcons[type]) { memoizedStyledIcons[type] = styled(componentMap[type])<IIconProps>( color, space, layout, flexbox, border, typography, position, customPosition, customBorder, customBackground, customOutline, customShadow, customExtra, customLayout, customTypography ); } return memoizedStyledIcons[type]; } const Icon = ({ type, name, style, ...props }: IIconProps, ref?: any) => { const { size, ...newProps } = usePropsResolution('Icon', props); if (!name) { return <SVGIcon ref={ref} {...props} style={style} />; } const Component = getStyledIconComponent(type ?? 'MaterialIcons'); return ( <Component name={name} {...newProps} ref={ref} style={[style, { fontSize: parseInt(size, 10) }]} /> ); }; export type { IIconProps, IconType, IconNameType }; </s> add export { default as Icon } from './Icon';
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/composites/Stat/index.tsx
return type === 'increase' ? ( <ChevronUpIcon ml={-1} color="green.500" size={8} {...props} ref={ref} /> ) : ( <ChevronDownIcon ml={-1} color="red.500" size={8} {...props} ref={ref} />
<mask> <mask> type IStatArrowProps = IIconProps | { type?: 'increase' | 'decrease' }; <mask> export const StatArrow = React.memo( <mask> React.forwardRef(({ type, ...props }: IStatArrowProps, ref?: any) => { <mask> return ( <mask> <Icon <mask> ml={-1} <mask> type="Entypo" <mask> name={type === 'increase' ? 'triangle-up' : 'triangle-down'} <mask> color={type === 'increase' ? 'green.500' : 'red.500'} <mask> size={8} <mask> {...props} <mask> ref={ref} <mask> /> <mask> ); <mask> }) <mask> ); <mask> <mask> export const StatGroup = React.memo( </s> feat: added custom icons and update componennts to support it </s> remove type IStatArrowProps = IIconProps | { type?: 'increase' | 'decrease' }; </s> add type IStatArrowProps = IIconProps & { type?: 'increase' | 'decrease' }; </s> remove icon={ <Icon name={colorMode === 'dark' ? 'light-up' : 'md-moon'} type={colorMode === 'dark' ? 'Entypo' : 'Ionicons'} color={colorMode === 'dark' ? 'white' : 'black'} /> } </s> add icon={colorMode === 'dark' ? <SunIcon /> : <MoonIcon />} </s> remove <Icon name={'chevron-small-up'} color="white" type="Entypo" {...newProps} ref={ref} /> </s> add <ChevronUpIcon color="white" {...newProps} ref={ref} /> </s> remove <Icon name={'chevron-small-down'} type="Entypo" {...newProps} ref={ref} /> </s> add <ChevronDownIcon {...newProps} ref={ref} />
[ "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/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/composites/Stat/index.tsx
import { Icon, IIconProps } from '../../primitives/Icon';
<mask> import React from 'react'; <mask> import Icon, { IIconProps } from '../../primitives/Icon'; <mask> import type { ITabsContextProps, ITabContextProps } from './types'; <mask> import { TabsContext } from './Context'; <mask> import { TabContext } from './Tab'; <mask> <mask> const TabIcon = (props: IIconProps, ref?: any) => { </s> feat: added custom icons and update componennts to support it </s> remove import Icon from '../../primitives/Icon'; </s> add import { CloseIcon } from '../../primitives/Icon/Icons'; </s> remove import Icon from '../../primitives/Icon'; </s> add import { ChevronDownIcon, ChevronUpIcon } from '../../primitives/Icon/Icons'; </s> remove import { IIconProps, default as Icon } from '../Icon'; </s> add import { IIconProps, Icon } from '../Icon'; </s> remove import { VStack, Box, Icon } from '../../primitives'; </s> add import { VStack, Box } from '../../primitives';
[ "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/composites/Tabs/TabIcon.tsx
<mask> import { usePropsResolution } from '../../../hooks/useThemeProps'; <mask> import { Center } from '../../composites/Center'; <mask> import { useFormControlContext } from '../../composites/FormControl'; <mask> import Box from '../Box'; <mask> import Icon from '../Icon'; <mask> import { mergeRefs } from './../../../utils'; <mask> import type { ICheckboxProps } from './types'; <mask> import { useToggleState } from '@react-stately/toggle'; <mask> import { CheckboxGroupContext } from './CheckboxGroup'; <mask> import { useCheckbox, useCheckboxGroupItem } from '@react-native-aria/checkbox'; </s> feat: added custom icons and update componennts to support it </s> remove import Icon from '../Icon'; </s> add </s> remove import Icon from '../Icon'; </s> add </s> remove import Icon from '../Icon'; </s> add </s> remove import Icon from '../Icon'; </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Checkbox/Checkbox.tsx
import { CheckIcon } from '../Icon/Icons';
<mask> import type { ICheckboxProps } from './types'; <mask> import { useToggleState } from '@react-stately/toggle'; <mask> import { CheckboxGroupContext } from './CheckboxGroup'; <mask> import { useCheckbox, useCheckboxGroupItem } from '@react-native-aria/checkbox'; <mask> <mask> const Checkbox = ( <mask> { icon, children, wrapperRef, ...props }: ICheckboxProps, <mask> ref: any <mask> ) => { <mask> const formControlContext = useFormControlContext(); </s> feat: added custom icons and update componennts to support it </s> remove import Icon from '../Icon'; </s> add </s> remove import Icon from '../Icon'; </s> add
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Checkbox/Checkbox.tsx
<CheckIcon
<mask> > <mask> {icon && sizedIcon && checked ? ( <mask> sizedIcon() <mask> ) : ( <mask> <Icon <mask> name="check" <mask> size={iconSize} <mask> {..._icon} <mask> opacity={checked ? 1 : 0} <mask> /> <mask> )} </s> feat: added custom icons and update componennts to support it </s> remove <Icon </s> add <CheckIcon </s> remove <Icon name="circle" {..._icon} size={iconSize} opacity={checked ? 1 : 0} /> </s> add <CircleIcon {..._icon} size={iconSize} opacity={checked ? 1 : 0} /> </s> remove <Icon name="circle" </s> add <CircleIcon </s> remove size={newProps._text.fontSize} </s> add // size={newProps._text.fontSize} size="sm" </s> remove <Icon name="check" </s> add <CheckIcon // TODO: Needs to update, with _icon (_prop) [Instead of passsing p here.]
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Checkbox/Checkbox.tsx
<mask> import { usePropsResolution } from '../../../hooks/useThemeProps'; <mask> import { Center } from '../../composites/Center'; <mask> import { useFormControlContext } from '../../composites/FormControl'; <mask> import Box from '../Box'; <mask> import Icon from '../Icon'; <mask> import type { ICheckboxProps } from './types'; <mask> import { useToggleState } from '@react-stately/toggle'; <mask> import { VisuallyHidden } from '@react-aria/visually-hidden'; <mask> import { CheckboxGroupContext } from './CheckboxGroup'; <mask> import { useHover } from '@react-native-aria/interactions'; </s> feat: added custom icons and update componennts to support it </s> remove import Icon from '../Icon'; </s> add </s> remove import Icon from '../Icon'; </s> add </s> remove import Icon from '../Icon'; </s> add </s> remove import Icon from '../Icon'; </s> add
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Checkbox/Checkbox.web.tsx
import { CheckIcon } from '../Icon/Icons';
<mask> import { useHover } from '@react-native-aria/interactions'; <mask> import { useCheckbox, useCheckboxGroupItem } from '@react-native-aria/checkbox'; <mask> import { useFocusRing } from '@react-native-aria/focus'; <mask> <mask> const Checkbox = ( <mask> { children, icon, wrapperRef, ...props }: ICheckboxProps, <mask> ref: any <mask> ) => { <mask> const formControlContext = useFormControlContext(); </s> feat: added custom icons and update componennts to support it </s> remove import Icon from '../Icon'; </s> add
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Checkbox/Checkbox.web.tsx
<CheckIcon
<mask> > <mask> {icon && sizedIcon && checked ? ( <mask> sizedIcon() <mask> ) : ( <mask> <Icon <mask> name="check" <mask> {..._icon} <mask> size={iconSize} <mask> opacity={checked ? 1 : 0} <mask> /> </s> feat: added custom icons and update componennts to support it </s> remove <Icon name="check" </s> add <CheckIcon </s> remove <Icon name="circle" {..._icon} size={iconSize} opacity={checked ? 1 : 0} /> </s> add <CircleIcon {..._icon} size={iconSize} opacity={checked ? 1 : 0} /> </s> remove <Icon name="circle" </s> add <CircleIcon </s> remove size={newProps._text.fontSize} </s> add // size={newProps._text.fontSize} size="sm" </s> remove <Icon name="check" </s> add <CheckIcon // TODO: Needs to update, with _icon (_prop) [Instead of passsing p here.]
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Checkbox/Checkbox.web.tsx
import { QuestionOutlineIcon } from './Icons';
<mask> Pattern, <mask> Mask, <mask> } from 'react-native-svg'; <mask> import type { IIconProps } from './types'; <mask> <mask> const VALID_SVG_COMPONENTS: any = { <mask> G, <mask> Path, <mask> Circle, <mask> Ellipse, </s> feat: added custom icons and update componennts to support it </s> remove import Icon, { IIconProps } from '../../primitives/Icon'; </s> add import { Icon, IIconProps } from '../../primitives/Icon'; </s> remove import { Icon } from 'native-base'; </s> add import { Icon, MoonIcon, SunIcon, CircleIcon } from 'native-base'; import { G, Polygon } from 'react-native-svg'; import { Ionicons } from '@expo/vector-icons'; </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon'; </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon';
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Icon/SVGIcon.tsx
const SVGIcon = ({ children, ...props }: IIconProps, ref: any) => { const { stroke, color, ...resolvedProps } = usePropsResolution('Icon', props); const strokeHex = useToken('colors', stroke || ''); const colorHex = useToken('colors', color || '');
<mask> customLayout, <mask> customTypography <mask> ); <mask> <mask> const SVGIcon = ( <mask> { <mask> viewBox, <mask> color: colorProp, <mask> stroke, <mask> strokeWidth, <mask> children, <mask> focusable, <mask> size, <mask> style, <mask> }: IIconProps, <mask> ref: any <mask> ) => { <mask> const newProps = usePropsResolution('Icon', { size }); <mask> let strokeColor = useToken('colors', stroke || ''); <mask> <mask> colorProp = useToken('colors', colorProp || 'primary.400'); <mask> <mask> return ( <mask> <SVG <mask> height={ <mask> newProps.size </s> feat: added custom icons and update componennts to support it </s> remove height={ newProps.size ? parseInt(newProps.size, 10) : parseInt(newProps.height, 10) } width={ newProps.size ? parseInt(newProps.size, 10) : parseInt(newProps.width, 10) } viewBox={viewBox} color={colorProp} stroke={strokeColor} strokeWidth={strokeWidth} focusable={focusable} </s> add {...resolvedProps} // height={ // newProps.size // ? parseInt(newProps.size, 10) // : parseInt(newProps.height, 10) // } // width={ // newProps.size // ? parseInt(newProps.size, 10) // : parseInt(newProps.width, 10) // } // viewBox={viewBox} color={colorHex} stroke={strokeHex} // strokeWidth={strokeWidth} // focusable={focusable} </s> remove const getIconName = () => { </s> add const getIcon = () => { </s> remove import React from 'react'; import { border, color, flexbox, layout, space, typography, position, } from 'styled-system'; import { customBorder, customBackground, customOutline, customLayout, customExtra, customShadow, customTypography, customPosition, } from '../../../utils/customProps'; import styled from 'styled-components/native'; import { usePropsResolution } from '../../../hooks/useThemeProps'; import { AntDesign, Entypo, EvilIcons, Feather, FontAwesome, FontAwesome5, Fontisto, Foundation, Ionicons, MaterialCommunityIcons, MaterialIcons, Octicons, SimpleLineIcons, Zocial, } from '@expo/vector-icons'; import type { IIconProps, IconType, IconNameType } from './types'; import SVGIcon from './SVGIcon'; const componentMap = { AntDesign, Entypo, EvilIcons, Feather, FontAwesome, FontAwesome5, Fontisto, Foundation, Ionicons, MaterialCommunityIcons, MaterialIcons, Octicons, SimpleLineIcons, Zocial, }; let memoizedStyledIcons: any = {}; function getStyledIconComponent(type: IconType) { if (!memoizedStyledIcons[type]) { memoizedStyledIcons[type] = styled(componentMap[type])<IIconProps>( color, space, layout, flexbox, border, typography, position, customPosition, customBorder, customBackground, customOutline, customShadow, customExtra, customLayout, customTypography ); } return memoizedStyledIcons[type]; } const Icon = ({ type, name, style, ...props }: IIconProps, ref?: any) => { const { size, ...newProps } = usePropsResolution('Icon', props); if (!name) { return <SVGIcon ref={ref} {...props} style={style} />; } const Component = getStyledIconComponent(type ?? 'MaterialIcons'); return ( <Component name={name} {...newProps} ref={ref} style={[style, { fontSize: parseInt(size, 10) }]} /> ); }; export type { IIconProps, IconType, IconNameType }; </s> add export { default as Icon } from './Icon';
[ "keep", "keep", "keep", "keep", "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/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Icon/SVGIcon.tsx
{...resolvedProps} // height={ // newProps.size // ? parseInt(newProps.size, 10) // : parseInt(newProps.height, 10) // } // width={ // newProps.size // ? parseInt(newProps.size, 10) // : parseInt(newProps.width, 10) // } // viewBox={viewBox} color={colorHex} stroke={strokeHex} // strokeWidth={strokeWidth} // focusable={focusable}
<mask> colorProp = useToken('colors', colorProp || 'primary.400'); <mask> <mask> return ( <mask> <SVG <mask> height={ <mask> newProps.size <mask> ? parseInt(newProps.size, 10) <mask> : parseInt(newProps.height, 10) <mask> } <mask> width={ <mask> newProps.size <mask> ? parseInt(newProps.size, 10) <mask> : parseInt(newProps.width, 10) <mask> } <mask> viewBox={viewBox} <mask> color={colorProp} <mask> stroke={strokeColor} <mask> strokeWidth={strokeWidth} <mask> focusable={focusable} <mask> accessibilityRole={'image'} <mask> style={style} <mask> ref={ref} <mask> > <mask> {React.Children.count(children) > 0 ? ( </s> feat: added custom icons and update componennts to support it </s> remove style={style} </s> add // style={style} </s> remove const SVGIcon = ( { viewBox, color: colorProp, stroke, strokeWidth, children, focusable, size, style, }: IIconProps, ref: any ) => { const newProps = usePropsResolution('Icon', { size }); let strokeColor = useToken('colors', stroke || ''); colorProp = useToken('colors', colorProp || 'primary.400'); </s> add const SVGIcon = ({ children, ...props }: IIconProps, ref: any) => { const { stroke, color, ...resolvedProps } = usePropsResolution('Icon', props); const strokeHex = useToken('colors', stroke || ''); const colorHex = useToken('colors', color || ''); </s> remove <Icon name="arrow-drop-up" type="MaterialIcons" color={iconColor} /> </s> add <ChevronUpIcon color={iconColor} /> </s> remove <Icon name="arrow-drop-down" type="MaterialIcons" color={iconColor} /> </s> add <ChevronDownIcon color={iconColor} /> </s> remove <Icon </s> add <CheckIcon
[ "keep", "keep", "keep", "keep", "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/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Icon/SVGIcon.tsx
// style={style}
<mask> stroke={strokeColor} <mask> strokeWidth={strokeWidth} <mask> focusable={focusable} <mask> accessibilityRole={'image'} <mask> style={style} <mask> ref={ref} <mask> > <mask> {React.Children.count(children) > 0 ? ( <mask> <G> <mask> {React.Children.map(children, ({ props: childProps, type }: any) => </s> feat: added custom icons and update componennts to support it </s> remove height={ newProps.size ? parseInt(newProps.size, 10) : parseInt(newProps.height, 10) } width={ newProps.size ? parseInt(newProps.size, 10) : parseInt(newProps.width, 10) } viewBox={viewBox} color={colorProp} stroke={strokeColor} strokeWidth={strokeWidth} focusable={focusable} </s> add {...resolvedProps} // height={ // newProps.size // ? parseInt(newProps.size, 10) // : parseInt(newProps.height, 10) // } // width={ // newProps.size // ? parseInt(newProps.size, 10) // : parseInt(newProps.width, 10) // } // viewBox={viewBox} color={colorHex} stroke={strokeHex} // strokeWidth={strokeWidth} // focusable={focusable} </s> remove return ( <Icon ml={-1} type="Entypo" name={type === 'increase' ? 'triangle-up' : 'triangle-down'} color={type === 'increase' ? 'green.500' : 'red.500'} size={8} {...props} ref={ref} /> </s> add return type === 'increase' ? ( <ChevronUpIcon ml={-1} color="green.500" size={8} {...props} ref={ref} /> ) : ( <ChevronDownIcon ml={-1} color="red.500" size={8} {...props} ref={ref} /> </s> remove <Icon </s> add <CheckIcon </s> remove <Icon name="circle" </s> add <CircleIcon </s> remove <Icon name="check" </s> add <CheckIcon
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Icon/SVGIcon.tsx
<QuestionOutlineIcon />
<mask> ) : null <mask> )} <mask> </G> <mask> ) : ( <mask> getDefaultIcon() <mask> )} <mask> </SVG> <mask> ); <mask> }; <mask> const ChildPath = ({ </s> feat: added custom icons and update componennts to support it </s> remove <Icon name="arrow-drop-down" type="MaterialIcons" color={iconColor} /> </s> add <ChevronDownIcon color={iconColor} /> </s> remove <Icon name="circle" </s> add <CircleIcon </s> remove <Icon name="check" </s> add <CheckIcon </s> remove <Icon name="circle" {..._icon} size={iconSize} opacity={checked ? 1 : 0} /> </s> add <CircleIcon {..._icon} size={iconSize} opacity={checked ? 1 : 0} /> </s> remove <Icon name={'chevron-small-down'} type="Entypo" {...newProps} ref={ref} /> </s> add <ChevronDownIcon {...newProps} ref={ref} />
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Icon/SVGIcon.tsx
<mask> stroke={pathStrokeColor} <mask> /> <mask> ); <mask> }; <mask> const getDefaultIcon = () => { <mask> return ( <mask> <G strokeWidth={1.5} stroke="currentColor"> <mask> <Path <mask> d={'M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25'} <mask> fill="none" <mask> /> <mask> <Path <mask> d={'M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0'} <mask> fill="none" <mask> /> <mask> <Circle cx="12" cy="12" r="11.25" fill="none" /> <mask> </G> <mask> ); <mask> }; <mask> export default React.memo(React.forwardRef(SVGIcon)); </s> feat: added custom icons and update componennts to support it </s> remove <Icon name="check" /> </s> add <Icon> <G fill="currentColor"> <Polygon points="5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039" /> </G> </Icon> <MoonIcon m={8} /> <CircleIcon color="red.200" /> <SunIcon /> <Icon color="red.500" m={8} as="A" /> <Icon color="red.500" m={8} as={Ionicons} /> </s> remove getDefaultIcon() </s> add <QuestionOutlineIcon /> </s> remove <Icon name={'chevron-small-down'} type="Entypo" {...newProps} ref={ref} /> </s> add <ChevronDownIcon {...newProps} ref={ref} /> </s> remove <Icon name={'chevron-small-up'} color="white" type="Entypo" {...newProps} ref={ref} /> </s> add <ChevronUpIcon color="white" {...newProps} ref={ref} /> </s> remove return ( <Icon ml={-1} type="Entypo" name={type === 'increase' ? 'triangle-up' : 'triangle-down'} color={type === 'increase' ? 'green.500' : 'red.500'} size={8} {...props} ref={ref} /> </s> add return type === 'increase' ? ( <ChevronUpIcon ml={-1} color="green.500" size={8} {...props} ref={ref} /> ) : ( <ChevronDownIcon ml={-1} color="red.500" size={8} {...props} ref={ref} />
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Icon/SVGIcon.tsx
export { default as Icon } from './Icon';
<mask> import React from 'react'; <mask> import { <mask> border, <mask> color, <mask> flexbox, <mask> layout, <mask> space, <mask> typography, <mask> position, <mask> } from 'styled-system'; <mask> import { <mask> customBorder, <mask> customBackground, <mask> customOutline, <mask> customLayout, <mask> customExtra, <mask> customShadow, <mask> customTypography, <mask> customPosition, <mask> } from '../../../utils/customProps'; <mask> import styled from 'styled-components/native'; <mask> import { usePropsResolution } from '../../../hooks/useThemeProps'; <mask> import { <mask> AntDesign, <mask> Entypo, <mask> EvilIcons, <mask> Feather, <mask> FontAwesome, <mask> FontAwesome5, <mask> Fontisto, <mask> Foundation, <mask> Ionicons, <mask> MaterialCommunityIcons, <mask> MaterialIcons, <mask> Octicons, <mask> SimpleLineIcons, <mask> Zocial, <mask> } from '@expo/vector-icons'; <mask> import type { IIconProps, IconType, IconNameType } from './types'; <mask> import SVGIcon from './SVGIcon'; <mask> <mask> const componentMap = { <mask> AntDesign, <mask> Entypo, <mask> EvilIcons, <mask> Feather, <mask> FontAwesome, <mask> FontAwesome5, <mask> Fontisto, <mask> Foundation, <mask> Ionicons, <mask> MaterialCommunityIcons, <mask> MaterialIcons, <mask> Octicons, <mask> SimpleLineIcons, <mask> Zocial, <mask> }; <mask> <mask> let memoizedStyledIcons: any = {}; <mask> function getStyledIconComponent(type: IconType) { <mask> if (!memoizedStyledIcons[type]) { <mask> memoizedStyledIcons[type] = styled(componentMap[type])<IIconProps>( <mask> color, <mask> space, <mask> layout, <mask> flexbox, <mask> border, <mask> typography, <mask> position, <mask> customPosition, <mask> customBorder, <mask> customBackground, <mask> customOutline, <mask> customShadow, <mask> customExtra, <mask> customLayout, <mask> customTypography <mask> ); <mask> } <mask> return memoizedStyledIcons[type]; <mask> } <mask> <mask> const Icon = ({ type, name, style, ...props }: IIconProps, ref?: any) => { <mask> const { size, ...newProps } = usePropsResolution('Icon', props); <mask> if (!name) { <mask> return <SVGIcon ref={ref} {...props} style={style} />; <mask> } <mask> const Component = getStyledIconComponent(type ?? 'MaterialIcons'); <mask> return ( <mask> <Component <mask> name={name} <mask> {...newProps} <mask> ref={ref} <mask> style={[style, { fontSize: parseInt(size, 10) }]} <mask> /> <mask> ); <mask> }; <mask> <mask> export type { IIconProps, IconType, IconNameType }; <mask> export { createIcon } from './createIcon'; <mask> export default React.memo(React.forwardRef(Icon)); </s> feat: added custom icons and update componennts to support it </s> remove export default React.memo(React.forwardRef(Icon)); </s> add export type { IIconProps, IconType, IconNameType } from './types'; </s> remove export { default as Icon, createIcon } from './Icon'; </s> add export { Icon, createIcon } from './Icon'; </s> remove import { IIconProps, default as Icon } from '../Icon'; </s> add import { IIconProps, Icon } from '../Icon'; </s> remove const SVGIcon = ( { viewBox, color: colorProp, stroke, strokeWidth, children, focusable, size, style, }: IIconProps, ref: any ) => { const newProps = usePropsResolution('Icon', { size }); let strokeColor = useToken('colors', stroke || ''); colorProp = useToken('colors', colorProp || 'primary.400'); </s> add const SVGIcon = ({ children, ...props }: IIconProps, ref: any) => { const { stroke, color, ...resolvedProps } = usePropsResolution('Icon', props); const strokeHex = useToken('colors', stroke || ''); const colorHex = useToken('colors', color || '');
[ "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", "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" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Icon/index.tsx
export type { IIconProps, IconType, IconNameType } from './types';
<mask> }; <mask> <mask> export type { IIconProps, IconType, IconNameType }; <mask> export { createIcon } from './createIcon'; <mask> export default React.memo(React.forwardRef(Icon)); </s> feat: added custom icons and update componennts to support it </s> remove export { default as Icon, createIcon } from './Icon'; </s> add export { Icon, createIcon } from './Icon'; </s> remove import React from 'react'; import { border, color, flexbox, layout, space, typography, position, } from 'styled-system'; import { customBorder, customBackground, customOutline, customLayout, customExtra, customShadow, customTypography, customPosition, } from '../../../utils/customProps'; import styled from 'styled-components/native'; import { usePropsResolution } from '../../../hooks/useThemeProps'; import { AntDesign, Entypo, EvilIcons, Feather, FontAwesome, FontAwesome5, Fontisto, Foundation, Ionicons, MaterialCommunityIcons, MaterialIcons, Octicons, SimpleLineIcons, Zocial, } from '@expo/vector-icons'; import type { IIconProps, IconType, IconNameType } from './types'; import SVGIcon from './SVGIcon'; const componentMap = { AntDesign, Entypo, EvilIcons, Feather, FontAwesome, FontAwesome5, Fontisto, Foundation, Ionicons, MaterialCommunityIcons, MaterialIcons, Octicons, SimpleLineIcons, Zocial, }; let memoizedStyledIcons: any = {}; function getStyledIconComponent(type: IconType) { if (!memoizedStyledIcons[type]) { memoizedStyledIcons[type] = styled(componentMap[type])<IIconProps>( color, space, layout, flexbox, border, typography, position, customPosition, customBorder, customBackground, customOutline, customShadow, customExtra, customLayout, customTypography ); } return memoizedStyledIcons[type]; } const Icon = ({ type, name, style, ...props }: IIconProps, ref?: any) => { const { size, ...newProps } = usePropsResolution('Icon', props); if (!name) { return <SVGIcon ref={ref} {...props} style={style} />; } const Component = getStyledIconComponent(type ?? 'MaterialIcons'); return ( <Component name={name} {...newProps} ref={ref} style={[style, { fontSize: parseInt(size, 10) }]} /> ); }; export type { IIconProps, IconType, IconNameType }; </s> add export { default as Icon } from './Icon'; </s> remove const defaultProps = { size: 8, color: 'primary' }; </s> add const defaultProps = { size: 'md', color: 'primary' }; </s> remove import { IIconProps, default as Icon } from '../Icon'; </s> add import { IIconProps, Icon } from '../Icon'; </s> remove import { Icon } from 'native-base'; </s> add import { Icon, MoonIcon, SunIcon, CircleIcon } from 'native-base'; import { G, Polygon } from 'react-native-svg'; import { Ionicons } from '@expo/vector-icons';
[ "keep", "keep", "keep", "keep", "replace" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Icon/index.tsx
// name?: IconNameType; // type?: IconType; as?: any;
<mask> customBackgroundProps & <mask> customTransformProps & <mask> customFlexboxProps & <mask> BorderProps & { <mask> name?: IconNameType; <mask> type?: IconType; <mask> style?: TextStyle; <mask> viewBox?: string; <mask> size?: string | number; <mask> color?: string; <mask> focusable?: boolean; </s> feat: added custom icons and update componennts to support it </s> remove type IStatArrowProps = IIconProps | { type?: 'increase' | 'decrease' }; </s> add type IStatArrowProps = IIconProps & { type?: 'increase' | 'decrease' }; </s> remove return ( <Icon ml={-1} type="Entypo" name={type === 'increase' ? 'triangle-up' : 'triangle-down'} color={type === 'increase' ? 'green.500' : 'red.500'} size={8} {...props} ref={ref} /> </s> add return type === 'increase' ? ( <ChevronUpIcon ml={-1} color="green.500" size={8} {...props} ref={ref} /> ) : ( <ChevronDownIcon ml={-1} color="red.500" size={8} {...props} ref={ref} /> </s> remove import { Icon, Box } from '../../primitives'; </s> add import { Box } from '../../primitives'; import { CheckIcon } from '../../primitives/Icon/Icons'; </s> remove import Icon from '../Icon'; </s> add </s> remove import Icon from '../Icon'; </s> add
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Icon/types.ts
import { IIconProps, Icon } from '../Icon';
<mask> import React from 'react'; <mask> import { IIconProps, default as Icon } from '../Icon'; <mask> import { usePropsResolution } from '../../../hooks/useThemeProps'; <mask> <mask> const ListIcon = (props: IIconProps, ref?: any) => { <mask> const newProps = usePropsResolution('ListIcon', props); <mask> </s> feat: added custom icons and update componennts to support it </s> remove import Icon from '../../primitives/Icon'; </s> add import { CloseIcon } from '../../primitives/Icon/Icons'; </s> remove import Icon, { IIconProps } from '../../primitives/Icon'; </s> add import { Icon, IIconProps } from '../../primitives/Icon'; </s> remove import Icon from '../Icon'; </s> add </s> remove import React from 'react'; import { border, color, flexbox, layout, space, typography, position, } from 'styled-system'; import { customBorder, customBackground, customOutline, customLayout, customExtra, customShadow, customTypography, customPosition, } from '../../../utils/customProps'; import styled from 'styled-components/native'; import { usePropsResolution } from '../../../hooks/useThemeProps'; import { AntDesign, Entypo, EvilIcons, Feather, FontAwesome, FontAwesome5, Fontisto, Foundation, Ionicons, MaterialCommunityIcons, MaterialIcons, Octicons, SimpleLineIcons, Zocial, } from '@expo/vector-icons'; import type { IIconProps, IconType, IconNameType } from './types'; import SVGIcon from './SVGIcon'; const componentMap = { AntDesign, Entypo, EvilIcons, Feather, FontAwesome, FontAwesome5, Fontisto, Foundation, Ionicons, MaterialCommunityIcons, MaterialIcons, Octicons, SimpleLineIcons, Zocial, }; let memoizedStyledIcons: any = {}; function getStyledIconComponent(type: IconType) { if (!memoizedStyledIcons[type]) { memoizedStyledIcons[type] = styled(componentMap[type])<IIconProps>( color, space, layout, flexbox, border, typography, position, customPosition, customBorder, customBackground, customOutline, customShadow, customExtra, customLayout, customTypography ); } return memoizedStyledIcons[type]; } const Icon = ({ type, name, style, ...props }: IIconProps, ref?: any) => { const { size, ...newProps } = usePropsResolution('Icon', props); if (!name) { return <SVGIcon ref={ref} {...props} style={style} />; } const Component = getStyledIconComponent(type ?? 'MaterialIcons'); return ( <Component name={name} {...newProps} ref={ref} style={[style, { fontSize: parseInt(size, 10) }]} /> ); }; export type { IIconProps, IconType, IconNameType }; </s> add export { default as Icon } from './Icon';
[ "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/List/ListIcon.tsx
<mask> import React from 'react'; <mask> import { default as Pressable, IPressableProps } from '../Pressable'; <mask> import Icon from '../Icon'; <mask> import { Center } from '../../composites/Center'; <mask> import Box from '../Box'; <mask> import { usePropsResolution } from '../../../hooks/useThemeProps'; <mask> import type { IRadioProps } from './types'; <mask> import { useRadio } from '@react-native-aria/radio'; </s> feat: added custom icons and update componennts to support it </s> remove import Icon from '../Icon'; </s> add </s> remove import Icon from '../Icon'; </s> add </s> remove import Icon from '../Icon'; </s> add </s> remove import Icon from '../Icon'; </s> add </s> remove import { IIconProps, default as Icon } from '../Icon'; </s> add import { IIconProps, Icon } from '../Icon';
[ "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Radio/Radio.tsx
import { CircleIcon } from '../Icon/Icons';
<mask> import { useRadio } from '@react-native-aria/radio'; <mask> import { RadioContext } from './RadioGroup'; <mask> import { mergeRefs } from '../../../utils'; <mask> <mask> const Radio = ( <mask> { icon, children, wrapperRef, ...props }: IRadioProps, <mask> ref: any </s> feat: added custom icons and update componennts to support it </s> remove import Icon from '../Icon'; </s> add
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Radio/Radio.tsx
<CircleIcon
<mask> > <mask> {icon && sizedIcon && checked ? ( <mask> sizedIcon() <mask> ) : ( <mask> <Icon <mask> name="circle" <mask> size={iconSize} <mask> {..._icon} <mask> opacity={checked ? 1 : 0} <mask> /> <mask> )} </s> feat: added custom icons and update componennts to support it </s> remove <Icon name="circle" {..._icon} size={iconSize} opacity={checked ? 1 : 0} /> </s> add <CircleIcon {..._icon} size={iconSize} opacity={checked ? 1 : 0} /> </s> remove <Icon name="check" </s> add <CheckIcon </s> remove <Icon </s> add <CheckIcon </s> remove size={newProps._text.fontSize} </s> add // size={newProps._text.fontSize} size="sm" </s> remove <Icon name="arrow-drop-down" type="MaterialIcons" color={iconColor} /> </s> add <ChevronDownIcon color={iconColor} />
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Radio/Radio.tsx
<mask> import React from 'react'; <mask> import Icon from '../Icon'; <mask> import Box from '../Box'; <mask> import { Center } from '../../composites/Center'; <mask> import { usePropsResolution } from '../../../hooks/useThemeProps'; <mask> import type { IRadioProps } from './types'; <mask> import { mergeRefs } from './../../../utils'; </s> feat: added custom icons and update componennts to support it </s> remove import Icon from '../Icon'; </s> add </s> remove import Icon from '../Icon'; </s> add </s> remove import Icon from '../Icon'; </s> add </s> remove import Icon from '../Icon'; </s> add </s> remove import { Icon, Box } from '../../primitives'; </s> add import { Box } from '../../primitives'; import { CheckIcon } from '../../primitives/Icon/Icons';
[ "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Radio/Radio.web.tsx
import { CircleIcon } from '../Icon/Icons';
<mask> import { useRadio } from '@react-native-aria/radio'; <mask> import { VisuallyHidden } from '@react-aria/visually-hidden'; <mask> import { RadioContext } from './RadioGroup'; <mask> import { useFocusRing } from '@react-native-aria/focus'; <mask> <mask> const Radio = ( <mask> { icon, children, wrapperRef, ...props }: IRadioProps, <mask> ref: any </s> feat: added custom icons and update componennts to support it </s> remove import Icon from '../Icon'; </s> add </s> remove import Icon from '../Icon'; </s> add
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Radio/Radio.web.tsx
<CircleIcon {..._icon} size={iconSize} opacity={checked ? 1 : 0} />
<mask> > <mask> {icon && sizedIcon && checked ? ( <mask> sizedIcon() <mask> ) : ( <mask> <Icon <mask> name="circle" <mask> {..._icon} <mask> size={iconSize} <mask> opacity={checked ? 1 : 0} <mask> /> <mask> )} <mask> </Center> <mask> </Center> <mask> {children} <mask> </Box> </s> feat: added custom icons and update componennts to support it </s> remove <Icon name="circle" </s> add <CircleIcon </s> remove <Icon name="check" </s> add <CheckIcon </s> remove <Icon </s> add <CheckIcon </s> remove size={newProps._text.fontSize} </s> add // size={newProps._text.fontSize} size="sm" </s> remove <Icon name="check" </s> add <CheckIcon // TODO: Needs to update, with _icon (_prop) [Instead of passsing p here.]
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Radio/Radio.web.tsx
<mask> import React from 'react'; <mask> import type { ISelectProps } from './types'; <mask> import { Platform, View, Pressable, ScrollView } from 'react-native'; <mask> import { Actionsheet } from '../../composites/Actionsheet'; <mask> import Icon from '../Icon'; <mask> import Box from '../Box'; <mask> import { Input } from '../Input'; <mask> import { useFocusRing } from '@react-native-aria/focus'; <mask> import { useControllableState } from '../../../hooks'; <mask> import { usePropsResolution } from '../../../hooks/useThemeProps'; </s> feat: added custom icons and update componennts to support it </s> remove import Icon from '../Icon'; </s> add </s> remove import Icon from '../Icon'; </s> add </s> remove import Icon from '../Icon'; </s> add </s> remove import Icon from '../Icon'; </s> add </s> remove import { Icon, Box } from '../../primitives'; </s> add import { Box } from '../../primitives'; import { CheckIcon } from '../../primitives/Icon/Icons';
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Select/Select.tsx
import { ChevronDownIcon } from '../Icon/Icons';
<mask> customShadow, <mask> customTypography, <mask> } from '../../../utils/customProps'; <mask> import { useToken } from '../../../hooks/useToken'; <mask> <mask> const StyledNativePicker = styled(RNPicker)<ISelectProps>( <mask> flex, <mask> color, <mask> space, </s> feat: added custom icons and update componennts to support it </s> remove import React from 'react'; import { border, color, flexbox, layout, space, typography, position, } from 'styled-system'; import { customBorder, customBackground, customOutline, customLayout, customExtra, customShadow, customTypography, customPosition, } from '../../../utils/customProps'; import styled from 'styled-components/native'; import { usePropsResolution } from '../../../hooks/useThemeProps'; import { AntDesign, Entypo, EvilIcons, Feather, FontAwesome, FontAwesome5, Fontisto, Foundation, Ionicons, MaterialCommunityIcons, MaterialIcons, Octicons, SimpleLineIcons, Zocial, } from '@expo/vector-icons'; import type { IIconProps, IconType, IconNameType } from './types'; import SVGIcon from './SVGIcon'; const componentMap = { AntDesign, Entypo, EvilIcons, Feather, FontAwesome, FontAwesome5, Fontisto, Foundation, Ionicons, MaterialCommunityIcons, MaterialIcons, Octicons, SimpleLineIcons, Zocial, }; let memoizedStyledIcons: any = {}; function getStyledIconComponent(type: IconType) { if (!memoizedStyledIcons[type]) { memoizedStyledIcons[type] = styled(componentMap[type])<IIconProps>( color, space, layout, flexbox, border, typography, position, customPosition, customBorder, customBackground, customOutline, customShadow, customExtra, customLayout, customTypography ); } return memoizedStyledIcons[type]; } const Icon = ({ type, name, style, ...props }: IIconProps, ref?: any) => { const { size, ...newProps } = usePropsResolution('Icon', props); if (!name) { return <SVGIcon ref={ref} {...props} style={style} />; } const Component = getStyledIconComponent(type ?? 'MaterialIcons'); return ( <Component name={name} {...newProps} ref={ref} style={[style, { fontSize: parseInt(size, 10) }]} /> ); }; export type { IIconProps, IconType, IconNameType }; </s> add export { default as Icon } from './Icon'; </s> remove import Icon from '../../primitives/Icon'; </s> add import { CloseIcon } from '../../primitives/Icon/Icons'; </s> remove import { VStack, Box, Icon } from '../../primitives'; </s> add import { VStack, Box } from '../../primitives';
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Select/Select.tsx
dropdownIcon ? ( dropdownIcon ) : ( <ChevronDownIcon {...customDropdownIconProps} /> )
<mask> focusable={false} <mask> size={size} <mask> variant={selectThemeProps.variant} <mask> InputRightElement={ <mask> dropdownIcon ? dropdownIcon : <Icon {...customDropdownIconProps} /> <mask> } <mask> {...(isHovered ? themeProps._hover : {})} <mask> {...nonLayoutProps} <mask> {...borderProps} <mask> /> </s> feat: added custom icons and update componennts to support it </s> remove <Icon name="arrow-drop-up" type="MaterialIcons" color={iconColor} /> </s> add <ChevronUpIcon color={iconColor} /> </s> remove icon={ <Icon name={colorMode === 'dark' ? 'light-up' : 'md-moon'} type={colorMode === 'dark' ? 'Entypo' : 'Ionicons'} color={colorMode === 'dark' ? 'white' : 'black'} /> } </s> add icon={colorMode === 'dark' ? <SunIcon /> : <MoonIcon />} </s> remove <Icon name="circle" {..._icon} size={iconSize} opacity={checked ? 1 : 0} /> </s> add <CircleIcon {..._icon} size={iconSize} opacity={checked ? 1 : 0} /> </s> remove <Icon </s> add <CheckIcon </s> remove <Icon name="check" </s> add <CheckIcon
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Select/Select.tsx
import { Icon } from '../../../primitives/Icon';
<mask> import React from 'react'; <mask> import Icon from '../../../primitives/Icon'; <mask> import { Circle, G } from 'react-native-svg'; <mask> <mask> export function Default(props: any) { <mask> return ( <mask> <Icon color={props.color} viewBox="0 0 64 64" size={props.size}> </s> feat: added custom icons and update componennts to support it </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon'; </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon'; </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon'; </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon'; </s> remove import { Icon } from 'native-base'; </s> add import { Icon, MoonIcon, SunIcon, CircleIcon } from 'native-base'; import { G, Polygon } from 'react-native-svg'; import { Ionicons } from '@expo/vector-icons';
[ "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Spinner/variants/default.tsx
import { Icon } from '../../../primitives/Icon';
<mask> import React from 'react'; <mask> import Icon from '../../../primitives/Icon'; <mask> import { Path } from 'react-native-svg'; <mask> <mask> export function Dotted(props: any) { <mask> return ( <mask> <Icon color={props.color} viewBox="0 0 66.238 69" size={props.size}> </s> feat: added custom icons and update componennts to support it </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon'; </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon'; </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon'; </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon'; </s> remove import { Icon } from 'native-base'; </s> add import { Icon, MoonIcon, SunIcon, CircleIcon } from 'native-base'; import { G, Polygon } from 'react-native-svg'; import { Ionicons } from '@expo/vector-icons';
[ "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Spinner/variants/dotted.tsx
import { Icon } from '../../../primitives/Icon';
<mask> import React from 'react'; <mask> import Icon from '../../../primitives/Icon'; <mask> import { Circle, Ellipse } from 'react-native-svg'; <mask> <mask> export function MultiColorDotted(props: any) { <mask> return ( <mask> <Icon color={props.color} viewBox="0 0 74.072 74.072" size={props.size}> </s> feat: added custom icons and update componennts to support it </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon'; </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon'; </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon'; </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon'; </s> remove import { Icon } from 'native-base'; </s> add import { Icon, MoonIcon, SunIcon, CircleIcon } from 'native-base'; import { G, Polygon } from 'react-native-svg'; import { Ionicons } from '@expo/vector-icons';
[ "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Spinner/variants/multiColorDotted.tsx
import { Icon } from '../../../primitives/Icon';
<mask> import React from 'react'; <mask> import Icon from '../../../primitives/Icon'; <mask> import { Circle, G } from 'react-native-svg'; <mask> <mask> export function SquareDotted(props: any) { <mask> return ( <mask> <Icon color={props.color} viewBox="0 0 50 50" size={props.size}> </s> feat: added custom icons and update componennts to support it </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon'; </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon'; </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon'; </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon'; </s> remove import { Icon } from 'native-base'; </s> add import { Icon, MoonIcon, SunIcon, CircleIcon } from 'native-base'; import { G, Polygon } from 'react-native-svg'; import { Ionicons } from '@expo/vector-icons';
[ "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Spinner/variants/squareDotted.tsx
import { Icon } from '../../../primitives/Icon';
<mask> import React from 'react'; <mask> import Icon from '../../../primitives/Icon'; <mask> import { Path, G } from 'react-native-svg'; <mask> <mask> export function Stroked(props: any) { <mask> return ( <mask> <Icon color={props.color} viewBox="0 0 69.672 69.672" size={props.size}> </s> feat: added custom icons and update componennts to support it </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon'; </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon'; </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon'; </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon'; </s> remove import { Icon } from 'native-base'; </s> add import { Icon, MoonIcon, SunIcon, CircleIcon } from 'native-base'; import { G, Polygon } from 'react-native-svg'; import { Ionicons } from '@expo/vector-icons';
[ "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/Spinner/variants/stroked.tsx
export { Icon, createIcon } from './Icon';
<mask> <mask> export { Radio } from './Radio'; <mask> export type { IRadioProps, IRadioGroupProps, IRadioValue } from './Radio'; <mask> <mask> export { default as Icon, createIcon } from './Icon'; <mask> export type { IIconProps, IconType, IconNameType } from './Icon'; <mask> <mask> export { Column } from './Column'; <mask> export { Row } from './Row'; <mask> </s> feat: added custom icons and update componennts to support it </s> remove export default React.memo(React.forwardRef(Icon)); </s> add export type { IIconProps, IconType, IconNameType } from './types'; </s> remove import React from 'react'; import { border, color, flexbox, layout, space, typography, position, } from 'styled-system'; import { customBorder, customBackground, customOutline, customLayout, customExtra, customShadow, customTypography, customPosition, } from '../../../utils/customProps'; import styled from 'styled-components/native'; import { usePropsResolution } from '../../../hooks/useThemeProps'; import { AntDesign, Entypo, EvilIcons, Feather, FontAwesome, FontAwesome5, Fontisto, Foundation, Ionicons, MaterialCommunityIcons, MaterialIcons, Octicons, SimpleLineIcons, Zocial, } from '@expo/vector-icons'; import type { IIconProps, IconType, IconNameType } from './types'; import SVGIcon from './SVGIcon'; const componentMap = { AntDesign, Entypo, EvilIcons, Feather, FontAwesome, FontAwesome5, Fontisto, Foundation, Ionicons, MaterialCommunityIcons, MaterialIcons, Octicons, SimpleLineIcons, Zocial, }; let memoizedStyledIcons: any = {}; function getStyledIconComponent(type: IconType) { if (!memoizedStyledIcons[type]) { memoizedStyledIcons[type] = styled(componentMap[type])<IIconProps>( color, space, layout, flexbox, border, typography, position, customPosition, customBorder, customBackground, customOutline, customShadow, customExtra, customLayout, customTypography ); } return memoizedStyledIcons[type]; } const Icon = ({ type, name, style, ...props }: IIconProps, ref?: any) => { const { size, ...newProps } = usePropsResolution('Icon', props); if (!name) { return <SVGIcon ref={ref} {...props} style={style} />; } const Component = getStyledIconComponent(type ?? 'MaterialIcons'); return ( <Component name={name} {...newProps} ref={ref} style={[style, { fontSize: parseInt(size, 10) }]} /> ); }; export type { IIconProps, IconType, IconNameType }; </s> add export { default as Icon } from './Icon'; </s> remove import { Icon } from 'native-base'; </s> add import { Icon, MoonIcon, SunIcon, CircleIcon } from 'native-base'; import { G, Polygon } from 'react-native-svg'; import { Ionicons } from '@expo/vector-icons'; </s> remove import Icon, { IIconProps } from '../../primitives/Icon'; </s> add import { Icon, IIconProps } from '../../primitives/Icon'; </s> remove import { Alert, Box, Icon, IconButton } from 'native-base'; </s> add import { Alert, Box, CloseIcon, IconButton } from 'native-base';
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/components/primitives/index.ts
export * from './components/primitives/Icon/Icons';
<mask> } from './components/primitives'; <mask> <mask> export * from './theme'; <mask> export * from './core'; <mask> export * from './hooks'; <mask> export * from './factory'; <mask> </s> feat: added custom icons and update componennts to support it </s> remove export { default as Icon, createIcon } from './Icon'; </s> add export { Icon, createIcon } from './Icon'; </s> remove export default React.memo(React.forwardRef(Icon)); </s> add export type { IIconProps, IconType, IconNameType } from './types'; </s> remove import { VStack, Box, Icon } from '../../primitives'; </s> add import { VStack, Box } from '../../primitives'; </s> remove import { Icon } from 'native-base'; </s> add import { Icon, MoonIcon, SunIcon, CircleIcon } from 'native-base'; import { G, Polygon } from 'react-native-svg'; import { Ionicons } from '@expo/vector-icons'; </s> remove import Icon from '../../../primitives/Icon'; </s> add import { Icon } from '../../../primitives/Icon';
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/index.tsx
'xxs': '2', 'xs': '4', 'sm': '6', 'md': '8', 'lg': '10', 'xl': '12', '2xl': '16', '3xl': '20', '4xl': '24', '5xl': '32',
<mask> }; <mask> }; <mask> <mask> const iconSizes = { <mask> 'xs': '16', <mask> 'sm': '20', <mask> 'md': '24', <mask> 'lg': '30', <mask> 'xl': '34', <mask> '2xl': '38', <mask> '3xl': '42', <mask> '4xl': '48', <mask> '5xl': '56', <mask> '6xl': '64', <mask> }; <mask> <mask> sizes = { <mask> ...sizes, </s> feat: added custom icons and update componennts to support it </s> remove const defaultProps = { size: 8, color: 'primary' }; </s> add const defaultProps = { size: 'md', color: 'primary' }; </s> remove type IStatArrowProps = IIconProps | { type?: 'increase' | 'decrease' }; </s> add type IStatArrowProps = IIconProps & { type?: 'increase' | 'decrease' }; </s> remove export default React.memo(React.forwardRef(Icon)); </s> add export type { IIconProps, IconType, IconNameType } from './types'; </s> remove const getDefaultIcon = () => { return ( <G strokeWidth={1.5} stroke="currentColor"> <Path d={'M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25'} fill="none" /> <Path d={'M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0'} fill="none" /> <Circle cx="12" cy="12" r="11.25" fill="none" /> </G> ); }; </s> add </s> remove import React from 'react'; import { border, color, flexbox, layout, space, typography, position, } from 'styled-system'; import { customBorder, customBackground, customOutline, customLayout, customExtra, customShadow, customTypography, customPosition, } from '../../../utils/customProps'; import styled from 'styled-components/native'; import { usePropsResolution } from '../../../hooks/useThemeProps'; import { AntDesign, Entypo, EvilIcons, Feather, FontAwesome, FontAwesome5, Fontisto, Foundation, Ionicons, MaterialCommunityIcons, MaterialIcons, Octicons, SimpleLineIcons, Zocial, } from '@expo/vector-icons'; import type { IIconProps, IconType, IconNameType } from './types'; import SVGIcon from './SVGIcon'; const componentMap = { AntDesign, Entypo, EvilIcons, Feather, FontAwesome, FontAwesome5, Fontisto, Foundation, Ionicons, MaterialCommunityIcons, MaterialIcons, Octicons, SimpleLineIcons, Zocial, }; let memoizedStyledIcons: any = {}; function getStyledIconComponent(type: IconType) { if (!memoizedStyledIcons[type]) { memoizedStyledIcons[type] = styled(componentMap[type])<IIconProps>( color, space, layout, flexbox, border, typography, position, customPosition, customBorder, customBackground, customOutline, customShadow, customExtra, customLayout, customTypography ); } return memoizedStyledIcons[type]; } const Icon = ({ type, name, style, ...props }: IIconProps, ref?: any) => { const { size, ...newProps } = usePropsResolution('Icon', props); if (!name) { return <SVGIcon ref={ref} {...props} style={style} />; } const Component = getStyledIconComponent(type ?? 'MaterialIcons'); return ( <Component name={name} {...newProps} ref={ref} style={[style, { fontSize: parseInt(size, 10) }]} /> ); }; export type { IIconProps, IconType, IconNameType }; </s> add export { default as Icon } from './Icon';
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/theme/components/icon.ts
const defaultProps = { size: 'md', color: 'primary' };
<mask> ...sizes, <mask> ...iconSizes, <mask> }; <mask> <mask> const defaultProps = { size: 8, color: 'primary' }; <mask> export default { baseStyle, sizes, defaultProps }; </s> feat: added custom icons and update componennts to support it </s> remove export default React.memo(React.forwardRef(Icon)); </s> add export type { IIconProps, IconType, IconNameType } from './types'; </s> remove 'xs': '16', 'sm': '20', 'md': '24', 'lg': '30', 'xl': '34', '2xl': '38', '3xl': '42', '4xl': '48', '5xl': '56', </s> add 'xxs': '2', 'xs': '4', 'sm': '6', 'md': '8', 'lg': '10', 'xl': '12', '2xl': '16', '3xl': '20', '4xl': '24', '5xl': '32', </s> remove const getDefaultIcon = () => { return ( <G strokeWidth={1.5} stroke="currentColor"> <Path d={'M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25'} fill="none" /> <Path d={'M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0'} fill="none" /> <Circle cx="12" cy="12" r="11.25" fill="none" /> </G> ); }; </s> add </s> remove type IStatArrowProps = IIconProps | { type?: 'increase' | 'decrease' }; </s> add type IStatArrowProps = IIconProps & { type?: 'increase' | 'decrease' }; </s> remove import React from 'react'; import { border, color, flexbox, layout, space, typography, position, } from 'styled-system'; import { customBorder, customBackground, customOutline, customLayout, customExtra, customShadow, customTypography, customPosition, } from '../../../utils/customProps'; import styled from 'styled-components/native'; import { usePropsResolution } from '../../../hooks/useThemeProps'; import { AntDesign, Entypo, EvilIcons, Feather, FontAwesome, FontAwesome5, Fontisto, Foundation, Ionicons, MaterialCommunityIcons, MaterialIcons, Octicons, SimpleLineIcons, Zocial, } from '@expo/vector-icons'; import type { IIconProps, IconType, IconNameType } from './types'; import SVGIcon from './SVGIcon'; const componentMap = { AntDesign, Entypo, EvilIcons, Feather, FontAwesome, FontAwesome5, Fontisto, Foundation, Ionicons, MaterialCommunityIcons, MaterialIcons, Octicons, SimpleLineIcons, Zocial, }; let memoizedStyledIcons: any = {}; function getStyledIconComponent(type: IconType) { if (!memoizedStyledIcons[type]) { memoizedStyledIcons[type] = styled(componentMap[type])<IIconProps>( color, space, layout, flexbox, border, typography, position, customPosition, customBorder, customBackground, customOutline, customShadow, customExtra, customLayout, customTypography ); } return memoizedStyledIcons[type]; } const Icon = ({ type, name, style, ...props }: IIconProps, ref?: any) => { const { size, ...newProps } = usePropsResolution('Icon', props); if (!name) { return <SVGIcon ref={ref} {...props} style={style} />; } const Component = getStyledIconComponent(type ?? 'MaterialIcons'); return ( <Component name={name} {...newProps} ref={ref} style={[style, { fontSize: parseInt(size, 10) }]} /> ); }; export type { IIconProps, IconType, IconNameType }; </s> add export { default as Icon } from './Icon';
[ "keep", "keep", "keep", "keep", "replace", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b70129642c7c07847540334e0fe9519fedbb55fa
src/theme/components/icon.ts
import Circle from './circle';
<mask> import Container from './container'; <mask> import HStack from './hstack'; <mask> import VStack from './vstack'; <mask> import Divider from './divider'; <mask> import SimpleGrid from './simple-grid'; <mask> import { <mask> FormControl, <mask> FormControlLabel, <mask> FormControlHelperText, <mask> FormControlErrorMessage, </s> feat: add circle , square
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b735a4ff839934b01c7ce37086f6583f354a9df3
src/theme/components/index.ts
import Square from './square';
<mask> import { TypeAheadSearchItem } from './typeahead'; <mask> import { Wrap } from './wrap'; <mask> import Flex from './flex'; <mask> import Stack from './stack'; <mask> import View from './view'; <mask> import ZStack from './zstack'; <mask> import FAB from './fab'; <mask> import { SliderTrack, Slider, SliderThumb, SliderFilledTrack } from './slider'; <mask> import InputLeftAddon from './inputleftaddon'; <mask> import InputRightAddon from './inputrightaddon'; </s> feat: add circle , square
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b735a4ff839934b01c7ce37086f6583f354a9df3
src/theme/components/index.ts
Circle,
<mask> Card, <mask> Center, <mask> Checkbox, <mask> CircularProgress, <mask> Code, <mask> Container, <mask> Divider, <mask> Fade, </s> feat: add circle , square
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/GeekyAnts/NativeBase/commit/b735a4ff839934b01c7ce37086f6583f354a9df3
src/theme/components/index.ts