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 |
|---|---|---|---|---|
const [layoutProps, nonLayoutProps] = extractInObject(resolvedProps, [
...stylingProps.margin,
...stylingProps.layout,
...stylingProps.flexbox,
...stylingProps.position,
'_text',
]);
const [
accessibilityProps,
nonAccessibilityProps,
] = extractInObject(nonLayoutProps, [
'accessibilityRole',
'accessibilityState',
]);
| <mask>
<mask> thumbStyles.transform.push({
<mask> scale: state.isThumbDragging(0) ? resolvedProps.scaleOnPressed : 1,
<mask> });
<mask> //TODO: refactor for responsive prop
<mask> if (useHasResponsiveProps(props)) {
<mask> return null;
<mask> }
</s> feat: pressed, hover, focus state </s> remove { isDisabled, isReadOnly }
</s> add {
isDisabled,
isReadOnly,
isPressed,
isFocused,
isHovered,
} </s> remove const resolvedProps = usePropsResolution(
</s> add const {
onFocus,
onBlur,
_stack,
_interactionBox,
...resolvedProps
} = usePropsResolution( </s> remove {props.children}
{Platform.OS === 'web' && (
<VisuallyHidden>
<input ref={inputRef} {...inputProps} />
</VisuallyHidden>
)}
</s> add <Stack {...layoutProps} {..._stack}>
<Center>
<Box {..._interactionBox} size={thumbSize} />
<Center {...nonAccessibilityProps}>
<Box>
{props.children}
{Platform.OS === 'web' && (
<VisuallyHidden>
<input ref={inputRef} {...inputProps} />
</VisuallyHidden>
)}
</Box>
</Center>
</Center>
</Stack> | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f0a034f428190546dedd23a562dfccd14168eb4 | src/components/primitives/Slider/SliderThumb.tsx |
{...accessibilityProps} | <mask> <Box
<mask> position="absolute"
<mask> {...thumbProps}
<mask> {...resolvedProps}
<mask> ref={ref}
<mask> style={[thumbStyles, props.style]}
<mask> // {...(isReadOnly && _readOnly)}
<mask> // {...(isDisabled && _disabled)}
<mask> >
<mask> {props.children}
</s> feat: pressed, hover, focus state </s> remove {props.children}
{Platform.OS === 'web' && (
<VisuallyHidden>
<input ref={inputRef} {...inputProps} />
</VisuallyHidden>
)}
</s> add <Stack {...layoutProps} {..._stack}>
<Center>
<Box {..._interactionBox} size={thumbSize} />
<Center {...nonAccessibilityProps}>
<Box>
{props.children}
{Platform.OS === 'web' && (
<VisuallyHidden>
<input ref={inputRef} {...inputProps} />
</VisuallyHidden>
)}
</Box>
</Center>
</Center>
</Stack> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f0a034f428190546dedd23a562dfccd14168eb4 | src/components/primitives/Slider/SliderThumb.tsx |
onFocus={(e: any) => {
handleFocus(true, onFocus ? () => onFocus(e) : () => {});
}}
onBlur={(e: any) => {
handleFocus(false, onBlur ? () => onBlur(e) : () => {});
}} | <mask> {...accessibilityProps}
<mask> style={[thumbStyles, props.style]}
<mask> // {...(isReadOnly && _readOnly)}
<mask> // {...(isDisabled && _disabled)}
<mask> ref={mergeRefs([_ref, ref])}
<mask> >
<mask> <Stack {...layoutProps} {..._stack}>
<mask> <Center>
</s> feat: pressed, hover, focus state </s> remove ref={ref}
</s> add {...accessibilityProps} </s> remove {props.children}
{Platform.OS === 'web' && (
<VisuallyHidden>
<input ref={inputRef} {...inputProps} />
</VisuallyHidden>
)}
</s> add <Stack {...layoutProps} {..._stack}>
<Center>
<Box {..._interactionBox} size={thumbSize} />
<Center {...nonAccessibilityProps}>
<Box>
{props.children}
{Platform.OS === 'web' && (
<VisuallyHidden>
<input ref={inputRef} {...inputProps} />
</VisuallyHidden>
)}
</Box>
</Center>
</Center>
</Stack> | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f0a034f428190546dedd23a562dfccd14168eb4 | src/components/primitives/Slider/SliderThumb.tsx |
ref={mergeRefs([_ref, ref])} | <mask> }}
<mask> // {...(isReadOnly && _readOnly)}
<mask> // {...(isDisabled && _disabled)}
<mask> >
<mask> <Stack {...layoutProps} {..._stack}>
<mask> <Center>
<mask> <Box {..._interactionBox} size={thumbSize} />
<mask> <Center {...nonAccessibilityProps}>
</s> feat: pressed, hover, focus state </s> remove {props.children}
{Platform.OS === 'web' && (
<VisuallyHidden>
<input ref={inputRef} {...inputProps} />
</VisuallyHidden>
)}
</s> add <Stack {...layoutProps} {..._stack}>
<Center>
<Box {..._interactionBox} size={thumbSize} />
<Center {...nonAccessibilityProps}>
<Box>
{props.children}
{Platform.OS === 'web' && (
<VisuallyHidden>
<input ref={inputRef} {...inputProps} />
</VisuallyHidden>
)}
</Box>
</Center>
</Center>
</Stack> </s> remove ref={ref}
</s> add {...accessibilityProps} | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f0a034f428190546dedd23a562dfccd14168eb4 | src/components/primitives/Slider/SliderThumb.tsx |
<Stack {...layoutProps} {..._stack}>
<Center>
<Box {..._interactionBox} size={thumbSize} />
<Center {...nonAccessibilityProps}>
<Box>
{props.children}
{Platform.OS === 'web' && (
<VisuallyHidden>
<input ref={inputRef} {...inputProps} />
</VisuallyHidden>
)}
</Box>
</Center>
</Center>
</Stack> | <mask> style={[thumbStyles, props.style]}
<mask> // {...(isReadOnly && _readOnly)}
<mask> // {...(isDisabled && _disabled)}
<mask> >
<mask> {props.children}
<mask> {Platform.OS === 'web' && (
<mask> <VisuallyHidden>
<mask> <input ref={inputRef} {...inputProps} />
<mask> </VisuallyHidden>
<mask> )}
<mask> </Box>
<mask> );
<mask> }
<mask>
<mask> SliderThumb.displayName = 'SliderThumb';
</s> feat: pressed, hover, focus state </s> remove ref={ref}
</s> add {...accessibilityProps} </s> remove { isDisabled, isReadOnly }
</s> add {
isDisabled,
isReadOnly,
isPressed,
isFocused,
isHovered,
} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f0a034f428190546dedd23a562dfccd14168eb4 | src/components/primitives/Slider/SliderThumb.tsx |
import { Fab, Icon, Box } from 'native-base'; | <mask> import { Fab, Icon, Text, Box } from 'native-base';
<mask> import React from 'react';
<mask> import { AntDesign } from '@expo/vector-icons';
<mask>
<mask> export const Example = () => {
<mask> return (
</s> fix: updated designs of few components </s> remove import { AntDesign } from '@expo/vector-icons';
</s> add import { MaterialIcons } from '@expo/vector-icons'; </s> remove import { Box, useBreakpointValue } from 'native-base';
</s> add import { Icon, useBreakpointValue, Text, VStack, Heading } from 'native-base';
import { FontAwesome, Foundation, Feather } from '@expo/vector-icons';
import { View } from 'react-native'; </s> remove import { Button, HStack, VStack, Text, Input, useClipboard } from 'native-base';
</s> add import { Button, HStack, VStack, Input, useClipboard } from 'native-base'; </s> remove import { MaterialIcons, Ionicons } from '@expo/vector-icons';
</s> add </s> remove const [copyText, setCopyText] = React.useState('Copy Me');
</s> add const [copyText, setCopyText] = React.useState('Hello'); | [
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/components/composites/Fab/Placement.tsx |
import { MaterialIcons } from '@expo/vector-icons'; | <mask> import { Fab, Icon, Text, Box } from 'native-base';
<mask> import React from 'react';
<mask> import { AntDesign } from '@expo/vector-icons';
<mask>
<mask> export const Example = () => {
<mask> return (
<mask> <Box h={400} w="100%">
<mask> <Fab
</s> fix: updated designs of few components </s> remove import { Fab, Icon, Text, Box } from 'native-base';
</s> add import { Fab, Icon, Box } from 'native-base'; </s> remove import { Box, useBreakpointValue } from 'native-base';
</s> add import { Icon, useBreakpointValue, Text, VStack, Heading } from 'native-base';
import { FontAwesome, Foundation, Feather } from '@expo/vector-icons';
import { View } from 'react-native'; </s> remove import { MaterialIcons, Ionicons } from '@expo/vector-icons';
</s> add </s> remove import { Button, HStack, VStack, Text, Input, useClipboard } from 'native-base';
</s> add import { Button, HStack, VStack, Input, useClipboard } from 'native-base'; </s> remove const [copyText, setCopyText] = React.useState('Copy Me');
</s> add const [copyText, setCopyText] = React.useState('Hello'); | [
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/components/composites/Fab/Placement.tsx |
borderRadius="full"
colorScheme="indigo"
placement="bottom-right"
icon={
<Icon
color="white"
as={<MaterialIcons name="lightbulb" />}
size="4"
/> | <mask> export const Example = () => {
<mask> return (
<mask> <Box h={400} w="100%">
<mask> <Fab
<mask> placement="top-right"
<mask> icon={<Icon color="white" as={<AntDesign name="plus" />} size={4} />}
<mask> label={
<mask> <Text color="white" fontSize="sm">
<mask> BUTTON
<mask> </Text>
<mask> }
<mask> />
<mask> </Box>
<mask> );
<mask> };
</s> fix: updated designs of few components </s> remove import { AntDesign } from '@expo/vector-icons';
</s> add import { MaterialIcons } from '@expo/vector-icons'; </s> remove <HStack alignItems="center">
<Icon
as={<Ionicons name="ios-chatbubbles" />}
color="gray.500"
size="sm"
/>
<Text ml="1" color="gray.500" fontWeight="500">
39 comments
</Text>
</HStack>
</s> add </s> remove import { MaterialIcons, Ionicons } from '@expo/vector-icons';
</s> add </s> remove const color = useBreakpointValue({
base: 'red.200',
sm: 'blue.200',
md: 'blue.200',
</s> add const flexDir = useBreakpointValue({
base: 'column',
lg: 'row', | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/components/composites/Fab/Placement.tsx |
label="Quick Start" | <mask> as={<MaterialIcons name="lightbulb" />}
<mask> size="4"
<mask> />
<mask> }
<mask> />
<mask> </Box>
<mask> );
<mask> };
</s> fix: updated designs of few components </s> remove placement="top-right"
icon={<Icon color="white" as={<AntDesign name="plus" />} size={4} />}
label={
<Text color="white" fontSize="sm">
BUTTON
</Text>
</s> add borderRadius="full"
colorScheme="indigo"
placement="bottom-right"
icon={
<Icon
color="white"
as={<MaterialIcons name="lightbulb" />}
size="4"
/> </s> remove <HStack alignItems="center">
<Icon
as={<Ionicons name="ios-chatbubbles" />}
color="gray.500"
size="sm"
/>
<Text ml="1" color="gray.500" fontWeight="500">
39 comments
</Text>
</HStack>
</s> add </s> remove <Icon
as={<MaterialIcons name="access-time" />}
color="gray.500"
size="sm"
/>
<Text ml="1" color="gray.500" fontWeight="500">
</s> add <Text color="gray.500" fontWeight="400"> </s> remove </VStack>
</s> add </HStack> </s> remove {Object.keys(colors.primary).map((key) => (
<ButtonTemplate shade={key} />
))}
<Button mt={2} onPress={toggleAccessibleColors} colorScheme="secondary">
</s> add {Object.keys(colors.yellow).map((key, index) => {
if (index > 1 && index < 9) return <ButtonTemplate shade={key} />;
})}
<Button mt="10" onPress={toggleAccessibleColors} colorScheme="primary"> | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/components/composites/Fab/Placement.tsx |
<mask> import React from 'react';
<mask> import {
<mask> Box,
<mask> Heading,
<mask> Icon,
<mask> AspectRatio,
<mask> Image,
<mask> Text,
<mask> Center,
<mask> HStack,
</s> fix: updated designs of few components </s> remove import { Fab, Icon, Text, Box } from 'native-base';
</s> add import { Fab, Icon, Box } from 'native-base'; </s> remove import { Box, useBreakpointValue } from 'native-base';
</s> add import { Icon, useBreakpointValue, Text, VStack, Heading } from 'native-base';
import { FontAwesome, Foundation, Feather } from '@expo/vector-icons';
import { View } from 'react-native'; </s> remove import { AntDesign } from '@expo/vector-icons';
</s> add import { MaterialIcons } from '@expo/vector-icons'; </s> remove import { Button, HStack, VStack, Text, Input, useClipboard } from 'native-base';
</s> add import { Button, HStack, VStack, Input, useClipboard } from 'native-base'; </s> remove import { MaterialIcons, Ionicons } from '@expo/vector-icons';
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/components/primitives/Box/composition.tsx | |
<mask> Center,
<mask> HStack,
<mask> Stack,
<mask> } from 'native-base';
<mask> import { MaterialIcons, Ionicons } from '@expo/vector-icons';
<mask>
<mask> export const Example = () => {
<mask> return (
<mask> <Box
<mask> width="72"
</s> fix: updated designs of few components </s> remove import { AntDesign } from '@expo/vector-icons';
</s> add import { MaterialIcons } from '@expo/vector-icons'; </s> remove import { Fab, Icon, Text, Box } from 'native-base';
</s> add import { Fab, Icon, Box } from 'native-base'; </s> remove import { Button, HStack, VStack, Text, Input, useClipboard } from 'native-base';
</s> add import { Button, HStack, VStack, Input, useClipboard } from 'native-base'; </s> remove import { Box, useBreakpointValue } from 'native-base';
</s> add import { Icon, useBreakpointValue, Text, VStack, Heading } from 'native-base';
import { FontAwesome, Foundation, Feather } from '@expo/vector-icons';
import { View } from 'react-native'; </s> remove const [copyText, setCopyText] = React.useState('Copy Me');
</s> add const [copyText, setCopyText] = React.useState('Hello'); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/components/primitives/Box/composition.tsx | |
rounded="lg"
overflow="hidden" | <mask>
<mask> export const Example = () => {
<mask> return (
<mask> <Box
<mask> width="72"
<mask> shadow={1}
<mask> _light={{ backgroundColor: 'gray.50' }}
<mask> _dark={{ backgroundColor: 'gray.700' }}
<mask> >
<mask> <Box>
</s> fix: updated designs of few components </s> remove import { MaterialIcons, Ionicons } from '@expo/vector-icons';
</s> add </s> remove NativeBase
</s> add Save Changes </s> remove <Heading
</s> add <Text </s> remove <Box bg={color} w={'100px'}>
This is a box
</Box>
</s> add <VStack space={10} alignItems="center" justifyContent="center">
<Heading>Why us?</Heading>
<View style={{ flexDirection: flexDir }}>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={FontAwesome}
name="dollar"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Money-back Guarantee
</Text>
</VStack>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={Foundation}
name="shield"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Secure Checkout
</Text>
</VStack>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={Feather}
name="clock"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Fast Turn Around
</Text>
</VStack>
</View>
</VStack> </s> remove roundedTop="lg"
</s> add | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/components/primitives/Box/composition.tsx |
<mask> >
<mask> <Box>
<mask> <AspectRatio ratio={16 / 9}>
<mask> <Image
<mask> roundedTop="lg"
<mask> source={{
<mask> uri:
<mask> 'https://www.holidify.com/images/cmsuploads/compressed/Bangalore_citycover_20190613234056.jpg',
<mask> }}
<mask> alt="image"
</s> fix: updated designs of few components </s> remove <Box bg={color} w={'100px'}>
This is a box
</Box>
</s> add <VStack space={10} alignItems="center" justifyContent="center">
<Heading>Why us?</Heading>
<View style={{ flexDirection: flexDir }}>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={FontAwesome}
name="dollar"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Money-back Guarantee
</Text>
</VStack>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={Foundation}
name="shield"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Secure Checkout
</Text>
</VStack>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={Feather}
name="clock"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Fast Turn Around
</Text>
</VStack>
</View>
</VStack> </s> remove NativeBase
</s> add Save Changes </s> remove px="2"
py="1"
</s> add px="3"
py="1.5" </s> remove <Center
p={1}
rounded="full"
bg="violet.500"
boxSize="10"
position="absolute"
right="0"
m="2"
_text={{
color: 'white',
textAlign: 'center',
fontWeight: '700',
fontSize: 'xs',
}}
>
27 MAR
</Center>
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/components/primitives/Box/composition.tsx | |
px="3"
py="1.5" | <mask> bg="violet.500"
<mask> _text={{ color: 'white', fontWeight: '700', fontSize: 'xs' }}
<mask> position="absolute"
<mask> bottom={0}
<mask> px="2"
<mask> py="1"
<mask> >
<mask> PHOTOS
<mask> </Center>
<mask> <Center
<mask> p={1}
</s> fix: updated designs of few components </s> remove <Center
p={1}
rounded="full"
bg="violet.500"
boxSize="10"
position="absolute"
right="0"
m="2"
_text={{
color: 'white',
textAlign: 'center',
fontWeight: '700',
fontSize: 'xs',
}}
>
27 MAR
</Center>
</s> add </s> remove NativeBase
</s> add Save Changes </s> remove key={`primary.${shade}`}
bg={`primary.${shade}`}
</s> add colorScheme="yellow"
key={`yellow.${shade}`}
bg={`yellow.${shade}`} </s> remove <Box bg={color} w={'100px'}>
This is a box
</Box>
</s> add <VStack space={10} alignItems="center" justifyContent="center">
<Heading>Why us?</Heading>
<View style={{ flexDirection: flexDir }}>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={FontAwesome}
name="dollar"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Money-back Guarantee
</Text>
</VStack>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={Foundation}
name="shield"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Secure Checkout
</Text>
</VStack>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={Feather}
name="clock"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Fast Turn Around
</Text>
</VStack>
</View>
</VStack> </s> remove const colorContrast = useContrastText(`teal.${shade}`);
</s> add const colorContrast = useContrastText(`yellow.${shade}`); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/components/primitives/Box/composition.tsx |
<mask> py="1"
<mask> >
<mask> PHOTOS
<mask> </Center>
<mask> <Center
<mask> p={1}
<mask> rounded="full"
<mask> bg="violet.500"
<mask> boxSize="10"
<mask> position="absolute"
<mask> right="0"
<mask> m="2"
<mask> _text={{
<mask> color: 'white',
<mask> textAlign: 'center',
<mask> fontWeight: '700',
<mask> fontSize: 'xs',
<mask> }}
<mask> >
<mask> 27 MAR
<mask> </Center>
<mask> </Box>
<mask> <Stack p="4" space={2}>
<mask> <Stack space={2}>
<mask> <Heading size="md" ml="-1">
<mask> The Garden City
</s> fix: updated designs of few components </s> remove <Stack p="4" space={2}>
</s> add <Stack p="4" space={3}> </s> remove px="2"
py="1"
</s> add px="3"
py="1.5" </s> remove <Heading
</s> add <Text </s> remove <Text fontSize="lg" display="flex">
The active color mode is <Text bold>{colorMode}</Text>
</s> add <Text fontSize="lg" display="flex" mb="10">
The active color mode is{' '}
<Text bold fontSize="lg">
{colorMode}
</Text> </s> remove NativeBase
</s> add Save Changes | [
"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/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/components/primitives/Box/composition.tsx | |
<Stack p="4" space={3}> | <mask> >
<mask> 27 MAR
<mask> </Center>
<mask> </Box>
<mask> <Stack p="4" space={2}>
<mask> <Stack space={2}>
<mask> <Heading size="md" ml="-1">
<mask> The Garden City
<mask> </Heading>
<mask> <Heading
</s> fix: updated designs of few components </s> remove <Center
p={1}
rounded="full"
bg="violet.500"
boxSize="10"
position="absolute"
right="0"
m="2"
_text={{
color: 'white',
textAlign: 'center',
fontWeight: '700',
fontSize: 'xs',
}}
>
27 MAR
</Center>
</s> add </s> remove <Heading
</s> add <Text </s> remove </Heading>
</s> add </Text> </s> remove <Text fontSize="lg" display="flex">
The active color mode is <Text bold>{colorMode}</Text>
</s> add <Text fontSize="lg" display="flex" mb="10">
The active color mode is{' '}
<Text bold fontSize="lg">
{colorMode}
</Text> </s> remove px="2"
py="1"
</s> add px="3"
py="1.5" | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/components/primitives/Box/composition.tsx |
<Text | <mask> <Stack space={2}>
<mask> <Heading size="md" ml="-1">
<mask> The Garden City
<mask> </Heading>
<mask> <Heading
<mask> fontSize="xs"
<mask> _light={{ color: 'violet.500' }}
<mask> _dark={{ color: 'violet.300' }}
<mask> fontWeight="500"
<mask> ml="-0.5"
</s> fix: updated designs of few components </s> remove <Stack p="4" space={2}>
</s> add <Stack p="4" space={3}> </s> remove <Center
p={1}
rounded="full"
bg="violet.500"
boxSize="10"
position="absolute"
right="0"
m="2"
_text={{
color: 'white',
textAlign: 'center',
fontWeight: '700',
fontSize: 'xs',
}}
>
27 MAR
</Center>
</s> add </s> remove <Box bg={color} w={'100px'}>
This is a box
</Box>
</s> add <VStack space={10} alignItems="center" justifyContent="center">
<Heading>Why us?</Heading>
<View style={{ flexDirection: flexDir }}>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={FontAwesome}
name="dollar"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Money-back Guarantee
</Text>
</VStack>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={Foundation}
name="shield"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Secure Checkout
</Text>
</VStack>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={Feather}
name="clock"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Fast Turn Around
</Text>
</VStack>
</View>
</VStack> </s> remove </Heading>
</s> add </Text> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/components/primitives/Box/composition.tsx |
</Text> | <mask> ml="-0.5"
<mask> mt="-1"
<mask> >
<mask> The Silicon Valley of India.
<mask> </Heading>
<mask> </Stack>
<mask> <Text fontWeight="400">
<mask> Bengaluru (also called Bangalore) is the center of India's high-tech
<mask> industry. The city is also known for its parks and nightlife.
<mask> </Text>
</s> fix: updated designs of few components </s> remove <Icon
as={<MaterialIcons name="access-time" />}
color="gray.500"
size="sm"
/>
<Text ml="1" color="gray.500" fontWeight="500">
</s> add <Text color="gray.500" fontWeight="400"> </s> remove <Heading
</s> add <Text </s> remove <Text fontSize="lg" display="flex">
The active color mode is <Text bold>{colorMode}</Text>
</s> add <Text fontSize="lg" display="flex" mb="10">
The active color mode is{' '}
<Text bold fontSize="lg">
{colorMode}
</Text> </s> remove <Stack p="4" space={2}>
</s> add <Stack p="4" space={3}> </s> remove <HStack alignItems="center">
<Icon
as={<Ionicons name="ios-chatbubbles" />}
color="gray.500"
size="sm"
/>
<Text ml="1" color="gray.500" fontWeight="500">
39 comments
</Text>
</HStack>
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/components/primitives/Box/composition.tsx |
<Text color="gray.500" fontWeight="400"> | <mask> industry. The city is also known for its parks and nightlife.
<mask> </Text>
<mask> <HStack alignItems="center" space={4} justifyContent="space-between">
<mask> <HStack alignItems="center">
<mask> <Icon
<mask> as={<MaterialIcons name="access-time" />}
<mask> color="gray.500"
<mask> size="sm"
<mask> />
<mask> <Text ml="1" color="gray.500" fontWeight="500">
<mask> 6 mins ago
<mask> </Text>
<mask> </HStack>
<mask> <HStack alignItems="center">
<mask> <Icon
</s> fix: updated designs of few components </s> remove <HStack alignItems="center">
<Icon
as={<Ionicons name="ios-chatbubbles" />}
color="gray.500"
size="sm"
/>
<Text ml="1" color="gray.500" fontWeight="500">
39 comments
</Text>
</HStack>
</s> add </s> remove </Heading>
</s> add </Text> </s> remove <Box bg={color} w={'100px'}>
This is a box
</Box>
</s> add <VStack space={10} alignItems="center" justifyContent="center">
<Heading>Why us?</Heading>
<View style={{ flexDirection: flexDir }}>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={FontAwesome}
name="dollar"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Money-back Guarantee
</Text>
</VStack>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={Foundation}
name="shield"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Secure Checkout
</Text>
</VStack>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={Feather}
name="clock"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Fast Turn Around
</Text>
</VStack>
</View>
</VStack> </s> remove placement="top-right"
icon={<Icon color="white" as={<AntDesign name="plus" />} size={4} />}
label={
<Text color="white" fontSize="sm">
BUTTON
</Text>
</s> add borderRadius="full"
colorScheme="indigo"
placement="bottom-right"
icon={
<Icon
color="white"
as={<MaterialIcons name="lightbulb" />}
size="4"
/> </s> remove <VStack space={3}>
<Text>{hasCopied ? 'Copied' : 'Press here'}</Text>
</s> add <HStack space={3}> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/components/primitives/Box/composition.tsx |
<mask> <Text ml="1" color="gray.500" fontWeight="500">
<mask> 6 mins ago
<mask> </Text>
<mask> </HStack>
<mask> <HStack alignItems="center">
<mask> <Icon
<mask> as={<Ionicons name="ios-chatbubbles" />}
<mask> color="gray.500"
<mask> size="sm"
<mask> />
<mask>
<mask> <Text ml="1" color="gray.500" fontWeight="500">
<mask> 39 comments
<mask> </Text>
<mask> </HStack>
<mask> </HStack>
<mask> </Stack>
<mask> </Box>
<mask> );
<mask> };
</s> fix: updated designs of few components </s> remove <Icon
as={<MaterialIcons name="access-time" />}
color="gray.500"
size="sm"
/>
<Text ml="1" color="gray.500" fontWeight="500">
</s> add <Text color="gray.500" fontWeight="400"> </s> remove placement="top-right"
icon={<Icon color="white" as={<AntDesign name="plus" />} size={4} />}
label={
<Text color="white" fontSize="sm">
BUTTON
</Text>
</s> add borderRadius="full"
colorScheme="indigo"
placement="bottom-right"
icon={
<Icon
color="white"
as={<MaterialIcons name="lightbulb" />}
size="4"
/> </s> remove <Box bg={color} w={'100px'}>
This is a box
</Box>
</s> add <VStack space={10} alignItems="center" justifyContent="center">
<Heading>Why us?</Heading>
<View style={{ flexDirection: flexDir }}>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={FontAwesome}
name="dollar"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Money-back Guarantee
</Text>
</VStack>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={Foundation}
name="shield"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Secure Checkout
</Text>
</VStack>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={Feather}
name="clock"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Fast Turn Around
</Text>
</VStack>
</View>
</VStack> </s> remove </VStack>
</s> add </HStack> </s> remove <VStack space={3}>
<Text>{hasCopied ? 'Copied' : 'Press here'}</Text>
</s> add <HStack space={3}> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/components/primitives/Box/composition.tsx | |
const colorContrast = useContrastText(`yellow.${shade}`); | <mask> useTheme,
<mask> } from 'native-base';
<mask>
<mask> const ButtonTemplate = ({ shade }: any) => {
<mask> const colorContrast = useContrastText(`teal.${shade}`);
<mask> return (
<mask> <Button
<mask> key={`primary.${shade}`}
<mask> bg={`primary.${shade}`}
<mask> _text={{ color: colorContrast }}
</s> fix: updated designs of few components </s> remove key={`primary.${shade}`}
bg={`primary.${shade}`}
</s> add colorScheme="yellow"
key={`yellow.${shade}`}
bg={`yellow.${shade}`} </s> remove NativeBase
</s> add Save Changes </s> remove import { Button, HStack, VStack, Text, Input, useClipboard } from 'native-base';
</s> add import { Button, HStack, VStack, Input, useClipboard } from 'native-base'; </s> remove const [copyText, setCopyText] = React.useState('Copy Me');
</s> add const [copyText, setCopyText] = React.useState('Hello'); </s> remove import { MaterialIcons, Ionicons } from '@expo/vector-icons';
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/hooks/useAccessibleColors/Basic.tsx |
colorScheme="yellow"
key={`yellow.${shade}`}
bg={`yellow.${shade}`} | <mask> const ButtonTemplate = ({ shade }: any) => {
<mask> const colorContrast = useContrastText(`teal.${shade}`);
<mask> return (
<mask> <Button
<mask> key={`primary.${shade}`}
<mask> bg={`primary.${shade}`}
<mask> _text={{ color: colorContrast }}
<mask> mb={1}
<mask> >
<mask> NativeBase
<mask> </Button>
</s> fix: updated designs of few components </s> remove const colorContrast = useContrastText(`teal.${shade}`);
</s> add const colorContrast = useContrastText(`yellow.${shade}`); </s> remove NativeBase
</s> add Save Changes </s> remove {Object.keys(colors.primary).map((key) => (
<ButtonTemplate shade={key} />
))}
<Button mt={2} onPress={toggleAccessibleColors} colorScheme="secondary">
</s> add {Object.keys(colors.yellow).map((key, index) => {
if (index > 1 && index < 9) return <ButtonTemplate shade={key} />;
})}
<Button mt="10" onPress={toggleAccessibleColors} colorScheme="primary"> </s> remove const { value, onCopy, hasCopied } = useClipboard();
</s> add const { value, onCopy } = useClipboard(); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/hooks/useAccessibleColors/Basic.tsx |
Save Changes | <mask> bg={`primary.${shade}`}
<mask> _text={{ color: colorContrast }}
<mask> mb={1}
<mask> >
<mask> NativeBase
<mask> </Button>
<mask> );
<mask> };
<mask>
<mask> export const Example = () => {
</s> fix: updated designs of few components </s> remove key={`primary.${shade}`}
bg={`primary.${shade}`}
</s> add colorScheme="yellow"
key={`yellow.${shade}`}
bg={`yellow.${shade}`} </s> remove const colorContrast = useContrastText(`teal.${shade}`);
</s> add const colorContrast = useContrastText(`yellow.${shade}`); </s> remove {Object.keys(colors.primary).map((key) => (
<ButtonTemplate shade={key} />
))}
<Button mt={2} onPress={toggleAccessibleColors} colorScheme="secondary">
</s> add {Object.keys(colors.yellow).map((key, index) => {
if (index > 1 && index < 9) return <ButtonTemplate shade={key} />;
})}
<Button mt="10" onPress={toggleAccessibleColors} colorScheme="primary"> </s> remove placement="top-right"
icon={<Icon color="white" as={<AntDesign name="plus" />} size={4} />}
label={
<Text color="white" fontSize="sm">
BUTTON
</Text>
</s> add borderRadius="full"
colorScheme="indigo"
placement="bottom-right"
icon={
<Icon
color="white"
as={<MaterialIcons name="lightbulb" />}
size="4"
/> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/hooks/useAccessibleColors/Basic.tsx |
{Object.keys(colors.yellow).map((key, index) => {
if (index > 1 && index < 9) return <ButtonTemplate shade={key} />;
})}
<Button mt="10" onPress={toggleAccessibleColors} colorScheme="primary"> | <mask> const { colors } = useTheme();
<mask>
<mask> return (
<mask> <>
<mask> {Object.keys(colors.primary).map((key) => (
<mask> <ButtonTemplate shade={key} />
<mask> ))}
<mask> <Button mt={2} onPress={toggleAccessibleColors} colorScheme="secondary">
<mask> Toggle Accessible Colors
<mask> </Button>
<mask> </>
<mask> );
<mask> };
</s> fix: updated designs of few components </s> remove NativeBase
</s> add Save Changes </s> remove key={`primary.${shade}`}
bg={`primary.${shade}`}
</s> add colorScheme="yellow"
key={`yellow.${shade}`}
bg={`yellow.${shade}`} </s> remove </VStack>
</s> add </HStack> </s> remove placement="top-right"
icon={<Icon color="white" as={<AntDesign name="plus" />} size={4} />}
label={
<Text color="white" fontSize="sm">
BUTTON
</Text>
</s> add borderRadius="full"
colorScheme="indigo"
placement="bottom-right"
icon={
<Icon
color="white"
as={<MaterialIcons name="lightbulb" />}
size="4"
/> </s> remove const colorContrast = useContrastText(`teal.${shade}`);
</s> add const colorContrast = useContrastText(`yellow.${shade}`); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/hooks/useAccessibleColors/Basic.tsx |
import { Icon, useBreakpointValue, Text, VStack, Heading } from 'native-base';
import { FontAwesome, Foundation, Feather } from '@expo/vector-icons';
import { View } from 'react-native'; | <mask> import React from 'react';
<mask> import { Box, useBreakpointValue } from 'native-base';
<mask> export const Example = () => {
<mask> const color = useBreakpointValue({
<mask> base: 'red.200',
<mask> sm: 'blue.200',
<mask> md: 'blue.200',
</s> fix: updated designs of few components </s> remove const color = useBreakpointValue({
base: 'red.200',
sm: 'blue.200',
md: 'blue.200',
</s> add const flexDir = useBreakpointValue({
base: 'column',
lg: 'row', </s> remove import { Fab, Icon, Text, Box } from 'native-base';
</s> add import { Fab, Icon, Box } from 'native-base'; </s> remove import { Button, HStack, VStack, Text, Input, useClipboard } from 'native-base';
</s> add import { Button, HStack, VStack, Input, useClipboard } from 'native-base'; </s> remove import { AntDesign } from '@expo/vector-icons';
</s> add import { MaterialIcons } from '@expo/vector-icons'; </s> remove const [copyText, setCopyText] = React.useState('Copy Me');
</s> add const [copyText, setCopyText] = React.useState('Hello'); | [
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/hooks/useBreakpointValue/usage.tsx |
const flexDir = useBreakpointValue({
base: 'column',
lg: 'row', | <mask> import React from 'react';
<mask> import { Box, useBreakpointValue } from 'native-base';
<mask> export const Example = () => {
<mask> const color = useBreakpointValue({
<mask> base: 'red.200',
<mask> sm: 'blue.200',
<mask> md: 'blue.200',
<mask> });
<mask> return (
<mask> <Box bg={color} w={'100px'}>
<mask> This is a box
<mask> </Box>
</s> fix: updated designs of few components </s> remove import { Box, useBreakpointValue } from 'native-base';
</s> add import { Icon, useBreakpointValue, Text, VStack, Heading } from 'native-base';
import { FontAwesome, Foundation, Feather } from '@expo/vector-icons';
import { View } from 'react-native'; </s> remove import { AntDesign } from '@expo/vector-icons';
</s> add import { MaterialIcons } from '@expo/vector-icons'; </s> remove import { Fab, Icon, Text, Box } from 'native-base';
</s> add import { Fab, Icon, Box } from 'native-base'; </s> remove import { Button, HStack, VStack, Text, Input, useClipboard } from 'native-base';
</s> add import { Button, HStack, VStack, Input, useClipboard } from 'native-base'; </s> remove import { MaterialIcons, Ionicons } from '@expo/vector-icons';
</s> add | [
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/hooks/useBreakpointValue/usage.tsx |
<VStack space={10} alignItems="center" justifyContent="center">
<Heading>Why us?</Heading>
<View style={{ flexDirection: flexDir }}>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={FontAwesome}
name="dollar"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Money-back Guarantee
</Text>
</VStack>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={Foundation}
name="shield"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Secure Checkout
</Text>
</VStack>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={Feather}
name="clock"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Fast Turn Around
</Text>
</VStack>
</View>
</VStack> | <mask> sm: 'blue.200',
<mask> md: 'blue.200',
<mask> });
<mask> return (
<mask> <Box bg={color} w={'100px'}>
<mask> This is a box
<mask> </Box>
<mask> );
<mask> };
</s> fix: updated designs of few components </s> remove const color = useBreakpointValue({
base: 'red.200',
sm: 'blue.200',
md: 'blue.200',
</s> add const flexDir = useBreakpointValue({
base: 'column',
lg: 'row', </s> remove import { Box, useBreakpointValue } from 'native-base';
</s> add import { Icon, useBreakpointValue, Text, VStack, Heading } from 'native-base';
import { FontAwesome, Foundation, Feather } from '@expo/vector-icons';
import { View } from 'react-native'; </s> remove placement="top-right"
icon={<Icon color="white" as={<AntDesign name="plus" />} size={4} />}
label={
<Text color="white" fontSize="sm">
BUTTON
</Text>
</s> add borderRadius="full"
colorScheme="indigo"
placement="bottom-right"
icon={
<Icon
color="white"
as={<MaterialIcons name="lightbulb" />}
size="4"
/> </s> remove <HStack alignItems="center">
<Icon
as={<Ionicons name="ios-chatbubbles" />}
color="gray.500"
size="sm"
/>
<Text ml="1" color="gray.500" fontWeight="500">
39 comments
</Text>
</HStack>
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/hooks/useBreakpointValue/usage.tsx |
import { Button, HStack, VStack, Input, useClipboard } from 'native-base'; | <mask> import React from 'react';
<mask> import { Button, HStack, VStack, Text, Input, useClipboard } from 'native-base';
<mask>
<mask> export const Example = () => {
<mask> const [copyText, setCopyText] = React.useState('Copy Me');
<mask> const [pasteText, setPasteText] = React.useState('');
<mask> const { value, onCopy, hasCopied } = useClipboard();
</s> fix: updated designs of few components </s> remove const [copyText, setCopyText] = React.useState('Copy Me');
</s> add const [copyText, setCopyText] = React.useState('Hello'); </s> remove const { value, onCopy, hasCopied } = useClipboard();
</s> add const { value, onCopy } = useClipboard(); </s> remove import { Box, useBreakpointValue } from 'native-base';
</s> add import { Icon, useBreakpointValue, Text, VStack, Heading } from 'native-base';
import { FontAwesome, Foundation, Feather } from '@expo/vector-icons';
import { View } from 'react-native'; </s> remove import { Fab, Icon, Text, Box } from 'native-base';
</s> add import { Fab, Icon, Box } from 'native-base'; </s> remove import { AntDesign } from '@expo/vector-icons';
</s> add import { MaterialIcons } from '@expo/vector-icons'; | [
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/hooks/useClipboard/Usage.tsx |
const [copyText, setCopyText] = React.useState('Hello'); | <mask> import React from 'react';
<mask> import { Button, HStack, VStack, Text, Input, useClipboard } from 'native-base';
<mask>
<mask> export const Example = () => {
<mask> const [copyText, setCopyText] = React.useState('Copy Me');
<mask> const [pasteText, setPasteText] = React.useState('');
<mask> const { value, onCopy, hasCopied } = useClipboard();
<mask> return (
<mask> <VStack space={2}>
<mask> <HStack space={3}>
</s> fix: updated designs of few components </s> remove import { Button, HStack, VStack, Text, Input, useClipboard } from 'native-base';
</s> add import { Button, HStack, VStack, Input, useClipboard } from 'native-base'; </s> remove const { value, onCopy, hasCopied } = useClipboard();
</s> add const { value, onCopy } = useClipboard(); </s> remove import { Box, useBreakpointValue } from 'native-base';
</s> add import { Icon, useBreakpointValue, Text, VStack, Heading } from 'native-base';
import { FontAwesome, Foundation, Feather } from '@expo/vector-icons';
import { View } from 'react-native'; </s> remove import { Fab, Icon, Text, Box } from 'native-base';
</s> add import { Fab, Icon, Box } from 'native-base'; </s> remove import { AntDesign } from '@expo/vector-icons';
</s> add import { MaterialIcons } from '@expo/vector-icons'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/hooks/useClipboard/Usage.tsx |
const { value, onCopy } = useClipboard(); | <mask>
<mask> export const Example = () => {
<mask> const [copyText, setCopyText] = React.useState('Copy Me');
<mask> const [pasteText, setPasteText] = React.useState('');
<mask> const { value, onCopy, hasCopied } = useClipboard();
<mask> return (
<mask> <VStack space={2}>
<mask> <HStack space={3}>
<mask> <Input
<mask> w="60%"
</s> fix: updated designs of few components </s> remove const [copyText, setCopyText] = React.useState('Copy Me');
</s> add const [copyText, setCopyText] = React.useState('Hello'); </s> remove import { Button, HStack, VStack, Text, Input, useClipboard } from 'native-base';
</s> add import { Button, HStack, VStack, Input, useClipboard } from 'native-base'; </s> remove const color = useBreakpointValue({
base: 'red.200',
sm: 'blue.200',
md: 'blue.200',
</s> add const flexDir = useBreakpointValue({
base: 'column',
lg: 'row', </s> remove import { MaterialIcons, Ionicons } from '@expo/vector-icons';
</s> add </s> remove const colorContrast = useContrastText(`teal.${shade}`);
</s> add const colorContrast = useContrastText(`yellow.${shade}`); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/hooks/useClipboard/Usage.tsx |
<HStack space={3}> | <mask> value={copyText}
<mask> />
<mask> <Button onPress={() => onCopy(copyText)}>Copy</Button>
<mask> </HStack>
<mask> <VStack space={3}>
<mask> <Text>{hasCopied ? 'Copied' : 'Press here'}</Text>
<mask> <Input
<mask> w="60%"
<mask> placeholder="Paste To"
<mask> onChangeText={(v) => setPasteText(v)}
<mask> value={pasteText}
</s> fix: updated designs of few components </s> remove placeholder="Paste To"
</s> add placeholder="Paste Here" </s> remove </VStack>
</s> add </HStack> </s> remove const { value, onCopy, hasCopied } = useClipboard();
</s> add const { value, onCopy } = useClipboard(); </s> remove <Text fontSize="lg" display="flex">
The active color mode is <Text bold>{colorMode}</Text>
</s> add <Text fontSize="lg" display="flex" mb="10">
The active color mode is{' '}
<Text bold fontSize="lg">
{colorMode}
</Text> </s> remove <HStack alignItems="center">
<Icon
as={<Ionicons name="ios-chatbubbles" />}
color="gray.500"
size="sm"
/>
<Text ml="1" color="gray.500" fontWeight="500">
39 comments
</Text>
</HStack>
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/hooks/useClipboard/Usage.tsx |
placeholder="Paste Here" | <mask> <VStack space={3}>
<mask> <Text>{hasCopied ? 'Copied' : 'Press here'}</Text>
<mask> <Input
<mask> w="60%"
<mask> placeholder="Paste To"
<mask> onChangeText={(v) => setPasteText(v)}
<mask> value={pasteText}
<mask> />
<mask> <Button onPress={() => setPasteText(value)}>Paste</Button>
<mask> </VStack>
</s> fix: updated designs of few components </s> remove <VStack space={3}>
<Text>{hasCopied ? 'Copied' : 'Press here'}</Text>
</s> add <HStack space={3}> </s> remove </VStack>
</s> add </HStack> </s> remove const { value, onCopy, hasCopied } = useClipboard();
</s> add const { value, onCopy } = useClipboard(); </s> remove <Box bg={color} w={'100px'}>
This is a box
</Box>
</s> add <VStack space={10} alignItems="center" justifyContent="center">
<Heading>Why us?</Heading>
<View style={{ flexDirection: flexDir }}>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={FontAwesome}
name="dollar"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Money-back Guarantee
</Text>
</VStack>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={Foundation}
name="shield"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Secure Checkout
</Text>
</VStack>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={Feather}
name="clock"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Fast Turn Around
</Text>
</VStack>
</View>
</VStack> </s> remove <Text fontSize="lg" display="flex">
The active color mode is <Text bold>{colorMode}</Text>
</s> add <Text fontSize="lg" display="flex" mb="10">
The active color mode is{' '}
<Text bold fontSize="lg">
{colorMode}
</Text> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/hooks/useClipboard/Usage.tsx |
</HStack> | <mask> onChangeText={(v) => setPasteText(v)}
<mask> value={pasteText}
<mask> />
<mask> <Button onPress={() => setPasteText(value)}>Paste</Button>
<mask> </VStack>
<mask> </VStack>
<mask> );
<mask> };
</s> fix: updated designs of few components </s> remove placeholder="Paste To"
</s> add placeholder="Paste Here" </s> remove <VStack space={3}>
<Text>{hasCopied ? 'Copied' : 'Press here'}</Text>
</s> add <HStack space={3}> </s> remove <Box bg={color} w={'100px'}>
This is a box
</Box>
</s> add <VStack space={10} alignItems="center" justifyContent="center">
<Heading>Why us?</Heading>
<View style={{ flexDirection: flexDir }}>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={FontAwesome}
name="dollar"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Money-back Guarantee
</Text>
</VStack>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={Foundation}
name="shield"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Secure Checkout
</Text>
</VStack>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={Feather}
name="clock"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Fast Turn Around
</Text>
</VStack>
</View>
</VStack> </s> remove {Object.keys(colors.primary).map((key) => (
<ButtonTemplate shade={key} />
))}
<Button mt={2} onPress={toggleAccessibleColors} colorScheme="secondary">
</s> add {Object.keys(colors.yellow).map((key, index) => {
if (index > 1 && index < 9) return <ButtonTemplate shade={key} />;
})}
<Button mt="10" onPress={toggleAccessibleColors} colorScheme="primary"> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/hooks/useClipboard/Usage.tsx |
<Text fontSize="lg" display="flex" mb="10">
The active color mode is{' '}
<Text bold fontSize="lg">
{colorMode}
</Text> | <mask> function UseColorMode() {
<mask> const { colorMode, toggleColorMode } = useColorMode();
<mask> return (
<mask> <Center flex={1} bg={colorMode === 'dark' ? 'black' : 'white'}>
<mask> <Text fontSize="lg" display="flex">
<mask> The active color mode is <Text bold>{colorMode}</Text>
<mask> </Text>
<mask> <Button onPress={toggleColorMode}>Toggle</Button>
<mask> </Center>
<mask> );
<mask> }
</s> fix: updated designs of few components </s> remove </Heading>
</s> add </Text> </s> remove const color = useBreakpointValue({
base: 'red.200',
sm: 'blue.200',
md: 'blue.200',
</s> add const flexDir = useBreakpointValue({
base: 'column',
lg: 'row', </s> remove <Icon
as={<MaterialIcons name="access-time" />}
color="gray.500"
size="sm"
/>
<Text ml="1" color="gray.500" fontWeight="500">
</s> add <Text color="gray.500" fontWeight="400"> </s> remove placement="top-right"
icon={<Icon color="white" as={<AntDesign name="plus" />} size={4} />}
label={
<Text color="white" fontSize="sm">
BUTTON
</Text>
</s> add borderRadius="full"
colorScheme="indigo"
placement="bottom-right"
icon={
<Icon
color="white"
as={<MaterialIcons name="lightbulb" />}
size="4"
/> </s> remove <Box bg={color} w={'100px'}>
This is a box
</Box>
</s> add <VStack space={10} alignItems="center" justifyContent="center">
<Heading>Why us?</Heading>
<View style={{ flexDirection: flexDir }}>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={FontAwesome}
name="dollar"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Money-back Guarantee
</Text>
</VStack>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={Foundation}
name="shield"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Secure Checkout
</Text>
</VStack>
<VStack
m="1.5"
w="140"
borderRadius="xl"
p="3"
bg="cyan.200"
space={2}
alignItems="center"
justifyContent="center"
>
<Icon
as={Feather}
name="clock"
size="sm"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
/>
<Text
fontSize="lg"
textAlign="center"
_dark={{ color: 'coolGray.800' }}
>
Fast Turn Around
</Text>
</VStack>
</View>
</VStack> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | example/storybook/stories/hooks/useColorMode/Basic.tsx |
label?: JSX.Element | string; | <mask> placement?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
<mask> /**
<mask> * Text to be displayed in Fab
<mask> */
<mask> label?: JSX.Element;
<mask> /**
<mask> * Icon to be displayed in Fab
<mask> */
<mask> icon?: JSX.Element;
<mask> /**
</s> fix: updated designs of few components </s> remove 'top-right': { top: 12, right: 4, position: 'absolute' },
'top-left': { top: 12, left: 4, position: 'absolute' },
</s> add 'top-right': { top: 4, right: 4, position: 'absolute' },
'top-left': { top: 4, left: 4, position: 'absolute' }, </s> remove <HStack alignItems="center">
<Icon
as={<Ionicons name="ios-chatbubbles" />}
color="gray.500"
size="sm"
/>
<Text ml="1" color="gray.500" fontWeight="500">
39 comments
</Text>
</HStack>
</s> add </s> remove import { AntDesign } from '@expo/vector-icons';
</s> add import { MaterialIcons } from '@expo/vector-icons'; </s> remove placement="top-right"
icon={<Icon color="white" as={<AntDesign name="plus" />} size={4} />}
label={
<Text color="white" fontSize="sm">
BUTTON
</Text>
</s> add borderRadius="full"
colorScheme="indigo"
placement="bottom-right"
icon={
<Icon
color="white"
as={<MaterialIcons name="lightbulb" />}
size="4"
/> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | src/components/composites/Fab/types.tsx |
'top-right': { top: 4, right: 4, position: 'absolute' },
'top-left': { top: 4, left: 4, position: 'absolute' }, | <mask> const placementProps: any = {
<mask> 'top-right': { top: 12, right: 4, position: 'absolute' },
<mask> 'top-left': { top: 12, left: 4, position: 'absolute' },
<mask> 'bottom-right': { bottom: 4, right: 4, position: 'absolute' },
<mask> 'bottom-left': { bottom: 4, left: 4, position: 'absolute' },
<mask> };
<mask> const baseStyle = {
<mask> shadow: 7,
</s> fix: updated designs of few components </s> remove const { value, onCopy, hasCopied } = useClipboard();
</s> add const { value, onCopy } = useClipboard(); </s> remove import { Button, HStack, VStack, Text, Input, useClipboard } from 'native-base';
</s> add import { Button, HStack, VStack, Input, useClipboard } from 'native-base'; </s> remove const [copyText, setCopyText] = React.useState('Copy Me');
</s> add const [copyText, setCopyText] = React.useState('Hello'); </s> remove import { Box, useBreakpointValue } from 'native-base';
</s> add import { Icon, useBreakpointValue, Text, VStack, Heading } from 'native-base';
import { FontAwesome, Foundation, Feather } from '@expo/vector-icons';
import { View } from 'react-native'; </s> remove import { Fab, Icon, Text, Box } from 'native-base';
</s> add import { Fab, Icon, Box } from 'native-base'; | [
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/0f80c8ab1f5f030b2331f99922bfc15ba343afa9 | src/theme/components/fab.ts |
const text = useColorModeValue('Light', 'Dark');
const bg = useColorModeValue('warmGray.50', 'coolGray.800'); | <mask> function UseColorMode() {
<mask> const { toggleColorMode } = useColorMode();
<mask> return (
<mask> <Center>
<mask> <Box p="4" flex="1" bg={bg} maxW="300" w="100%" mt={10} safeArea>
<mask> <Text fontSize="lg" display="flex" mb={20}>
</s> fix: move useColorModeValue hook at top </s> remove {useColorModeValue('Light', 'Dark')}
</s> add {text} </s> remove <Box
p="4"
flex="1"
bg={useColorModeValue('warmGray.50', 'coolGray.800')}
maxW="300"
w="100%"
mt={10}
safeArea
>
</s> add <Box p="4" flex="1" bg={bg} maxW="300" w="100%" mt={10} safeArea> | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/1089f0c7450a6d02d6738ef0024dd56705a8d555 | example/storybook/stories/hooks/useColorModeValue/Basic.tsx |
<Box p="4" flex="1" bg={bg} maxW="300" w="100%" mt={10} safeArea> | <mask> function UseColorMode() {
<mask> const { toggleColorMode } = useColorMode();
<mask> return (
<mask> <Center>
<mask> <Box
<mask> p="4"
<mask> flex="1"
<mask> bg={useColorModeValue('warmGray.50', 'coolGray.800')}
<mask> maxW="300"
<mask> w="100%"
<mask> mt={10}
<mask> safeArea
<mask> >
<mask> <Text fontSize="lg" display="flex" mb={20}>
<mask> The active color mode is{' '}
<mask> <Text bold fontSize="18px">
<mask> {useColorModeValue('Light', 'Dark')}
<mask> </Text>
</s> fix: move useColorModeValue hook at top </s> remove {useColorModeValue('Light', 'Dark')}
</s> add {text} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/1089f0c7450a6d02d6738ef0024dd56705a8d555 | example/storybook/stories/hooks/useColorModeValue/Basic.tsx |
{text} | <mask> >
<mask> <Text fontSize="lg" display="flex" mb={20}>
<mask> The active color mode is{' '}
<mask> <Text bold fontSize="18px">
<mask> {useColorModeValue('Light', 'Dark')}
<mask> </Text>
<mask> </Text>
<mask> <Button onPress={toggleColorMode} h={10}>
<mask> Toggle
<mask> </Button>
</s> fix: move useColorModeValue hook at top </s> remove <Box
p="4"
flex="1"
bg={useColorModeValue('warmGray.50', 'coolGray.800')}
maxW="300"
w="100%"
mt={10}
safeArea
>
</s> add <Box p="4" flex="1" bg={bg} maxW="300" w="100%" mt={10} safeArea> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/1089f0c7450a6d02d6738ef0024dd56705a8d555 | example/storybook/stories/hooks/useColorModeValue/Basic.tsx |
import { isArray, remove } from 'lodash'; | <mask> Platform,
<mask> View,
<mask> StyleSheet
<mask> } from 'react-native';
<mask> import _ from 'lodash';
<mask> import { connectStyle } from 'native-base-shoutem-theme';
<mask>
<mask> import variables from '../theme/variables/platform';
<mask> import computeProps from '../utils/computeProps';
<mask> import mapPropsToStyleNames from '../utils/mapPropsToStyleNames';
</s> fix(): Fix floatingLabel with placeholder issue (#2872) </s> remove _.remove(childrenArray, item => {
</s> add remove(childrenArray, item => { </s> remove _.remove(childrenArray, item => {
</s> add remove(childrenArray, item => { </s> remove image = _.remove(childrenArray, item => {
</s> add image = remove(childrenArray, item => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/108a97ec6d9ba307370f5a629fbce2b22b008af7 | src/basic/Item.js |
getPlacholderValue(inputProps) {
let placeholderValue;
if (isArray(this.props.children) && this.props.children[0].props.children) {
placeholderValue = null;
} else {
placeholderValue = inputProps.placeholder;
}
return placeholderValue;
}
| <mask> }
<mask> };
<mask> }
<mask>
<mask> floatBack(e) {
<mask> Animated.timing(this.state.topAnim, {
<mask> toValue: e || 18,
<mask> duration: 150
</s> fix(): Fix floatingLabel with placeholder issue (#2872) </s> remove if (this.props.children[i].props.children || this.props.children[i].props.placeholder) {
</s> add if (
(this.props.children[i].props.children ||
this.props.children[i].props.placeholder) &&
flag
) {
flag = false;
</s> remove import _ from 'lodash';
</s> add import { isArray, remove } from 'lodash'; </s> remove _.remove(childrenArray, item => {
</s> add remove(childrenArray, item => { </s> remove _.remove(childrenArray, item => {
</s> add remove(childrenArray, item => { | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/108a97ec6d9ba307370f5a629fbce2b22b008af7 | src/basic/Item.js |
remove(childrenArray, item => { | <mask> // eslint-disable-next-line camelcase
<mask> UNSAFE_componentWillReceiveProps(nextProps) {
<mask> const childrenArray = React.Children.toArray(nextProps.children);
<mask>
<mask> _.remove(childrenArray, item => {
<mask> if (item.type.displayName === 'Styled(Input)') {
<mask> this.inputProps = item.props;
<mask> return item;
<mask> }
<mask> return null;
</s> fix(): Fix floatingLabel with placeholder issue (#2872) </s> remove label = _.remove(childrenArray, item => {
</s> add label = remove(childrenArray, item => { </s> remove _.remove(childrenArray, item => {
</s> add remove(childrenArray, item => { </s> remove icon = _.remove(childrenArray, item => {
</s> add icon = remove(childrenArray, item => { </s> remove image = _.remove(childrenArray, item => {
</s> add image = remove(childrenArray, item => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/108a97ec6d9ba307370f5a629fbce2b22b008af7 | src/basic/Item.js |
label = remove(childrenArray, item => { | <mask> const childrenArray = React.Children.toArray(this.props.children);
<mask>
<mask> let label = [];
<mask> let labelProps = {};
<mask> label = _.remove(childrenArray, item => {
<mask> if (item.type === Label) {
<mask> labelProps = item.props;
<mask> return item;
<mask> }
<mask> return null;
</s> fix(): Fix floatingLabel with placeholder issue (#2872) </s> remove icon = _.remove(childrenArray, item => {
</s> add icon = remove(childrenArray, item => { </s> remove _.remove(childrenArray, item => {
</s> add remove(childrenArray, item => { </s> remove _.remove(childrenArray, item => {
</s> add remove(childrenArray, item => { </s> remove image = _.remove(childrenArray, item => {
</s> add image = remove(childrenArray, item => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/108a97ec6d9ba307370f5a629fbce2b22b008af7 | src/basic/Item.js |
remove(childrenArray, item => { | <mask> return null;
<mask> });
<mask>
<mask> let inputProps = {};
<mask> _.remove(childrenArray, item => {
<mask> if (item.type === Input) {
<mask> inputProps = item.props;
<mask> this.inputProps = item.props;
<mask> return item;
<mask> }
</s> fix(): Fix floatingLabel with placeholder issue (#2872) </s> remove icon = _.remove(childrenArray, item => {
</s> add icon = remove(childrenArray, item => { </s> remove _.remove(childrenArray, item => {
</s> add remove(childrenArray, item => { </s> remove label = _.remove(childrenArray, item => {
</s> add label = remove(childrenArray, item => { </s> remove image = _.remove(childrenArray, item => {
</s> add image = remove(childrenArray, item => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/108a97ec6d9ba307370f5a629fbce2b22b008af7 | src/basic/Item.js |
icon = remove(childrenArray, item => { | <mask> });
<mask>
<mask> let icon = [];
<mask> let iconProps = {};
<mask> icon = _.remove(childrenArray, item => {
<mask> if (item.type === Icon) {
<mask> iconProps = item.props;
<mask> return item;
<mask> }
<mask> return null;
</s> fix(): Fix floatingLabel with placeholder issue (#2872) </s> remove _.remove(childrenArray, item => {
</s> add remove(childrenArray, item => { </s> remove label = _.remove(childrenArray, item => {
</s> add label = remove(childrenArray, item => { </s> remove image = _.remove(childrenArray, item => {
</s> add image = remove(childrenArray, item => { </s> remove _.remove(childrenArray, item => {
</s> add remove(childrenArray, item => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/108a97ec6d9ba307370f5a629fbce2b22b008af7 | src/basic/Item.js |
image = remove(childrenArray, item => { | <mask> return null;
<mask> });
<mask>
<mask> let image = [];
<mask> image = _.remove(childrenArray, item => {
<mask> if (item.type === Thumbnail) {
<mask> return item;
<mask> }
<mask> return null;
<mask> });
</s> fix(): Fix floatingLabel with placeholder issue (#2872) </s> remove icon = _.remove(childrenArray, item => {
</s> add icon = remove(childrenArray, item => { </s> remove _.remove(childrenArray, item => {
</s> add remove(childrenArray, item => { </s> remove label = _.remove(childrenArray, item => {
</s> add label = remove(childrenArray, item => { </s> remove _.remove(childrenArray, item => {
</s> add remove(childrenArray, item => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/108a97ec6d9ba307370f5a629fbce2b22b008af7 | src/basic/Item.js |
let flag = true; | <mask> return null;
<mask> });
<mask>
<mask> if (this.props.floatingLabel && icon.length) {
<mask> let isIcon = false;
<mask>
<mask> for (let i = 0; i < this.props.children.length; i++) {
<mask> if (
<mask> this.props.children[i].props.name &&
<mask> this.props.children[i].type.displayName !== 'Styled(Input)'
</s> fix(): Fix floatingLabel with placeholder issue (#2872) </s> remove if (this.props.children[i].props.children || this.props.children[i].props.placeholder) {
</s> add if (
(this.props.children[i].props.children ||
this.props.children[i].props.placeholder) &&
flag
) {
flag = false;
</s> remove image = _.remove(childrenArray, item => {
</s> add image = remove(childrenArray, item => { </s> remove _.remove(childrenArray, item => {
</s> add remove(childrenArray, item => { </s> remove icon = _.remove(childrenArray, item => {
</s> add icon = remove(childrenArray, item => { | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/108a97ec6d9ba307370f5a629fbce2b22b008af7 | src/basic/Item.js |
if (
(this.props.children[i].props.children ||
this.props.children[i].props.placeholder) &&
flag
) {
flag = false;
| <mask> newChildren.push(
<mask> <Icon key={[i]} {...this.props.children[i].props} />
<mask> );
<mask> }
<mask> if (this.props.children[i].props.children || this.props.children[i].props.placeholder) {
<mask> newChildren.push(
<mask> <Animated.View
<mask> key="float"
<mask> style={{
<mask> position: 'absolute',
</s> fix(): Fix floatingLabel with placeholder issue (#2872) </s> remove _.remove(childrenArray, item => {
</s> add remove(childrenArray, item => { </s> remove _.remove(childrenArray, item => {
</s> add remove(childrenArray, item => { </s> remove image = _.remove(childrenArray, item => {
</s> add image = remove(childrenArray, item => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/108a97ec6d9ba307370f5a629fbce2b22b008af7 | src/basic/Item.js |
placeholder={this.getPlacholderValue(inputProps)} | <mask> <Input
<mask> ref={c => (this._inputRef = c)}
<mask> key="l2"
<mask> {...inputProps}
<mask> onFocus={() => {
<mask> this.setState({ isFocused: true });
<mask> if (inputProps.onFocus) {
<mask> inputProps.onFocus();
<mask> }
</s> fix(): Fix floatingLabel with placeholder issue (#2872) </s> remove image = _.remove(childrenArray, item => {
</s> add image = remove(childrenArray, item => { </s> remove _.remove(childrenArray, item => {
</s> add remove(childrenArray, item => { </s> remove icon = _.remove(childrenArray, item => {
</s> add icon = remove(childrenArray, item => { | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/108a97ec6d9ba307370f5a629fbce2b22b008af7 | src/basic/Item.js |
placeholder={this.getPlacholderValue(inputProps)} | <mask> key="l2"
<mask> {...inputProps}
<mask> onFocus={() => {
<mask> this.setState({ isFocused: true });
<mask> inputProps.onFocus && inputProps.onFocus();
<mask> }}
<mask> onBlur={e => {
</s> fix(): Fix floatingLabel with placeholder issue (#2872) </s> remove image = _.remove(childrenArray, item => {
</s> add image = remove(childrenArray, item => { </s> remove _.remove(childrenArray, item => {
</s> add remove(childrenArray, item => { </s> remove icon = _.remove(childrenArray, item => {
</s> add icon = remove(childrenArray, item => { | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/108a97ec6d9ba307370f5a629fbce2b22b008af7 | src/basic/Item.js |
placeholder={this.getPlacholderValue(inputProps)} | <mask> value={this.state.text}
<mask> key="l2"
<mask> {...inputProps}
<mask> onFocus={() => {
<mask> this.setState({ isFocused: true });
<mask> inputProps.onFocus && inputProps.onFocus();
<mask> }}
<mask> onBlur={e => {
</s> fix(): Fix floatingLabel with placeholder issue (#2872) </s> remove image = _.remove(childrenArray, item => {
</s> add image = remove(childrenArray, item => { </s> remove _.remove(childrenArray, item => {
</s> add remove(childrenArray, item => { </s> remove icon = _.remove(childrenArray, item => {
</s> add icon = remove(childrenArray, item => { | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/108a97ec6d9ba307370f5a629fbce2b22b008af7 | src/basic/Item.js |
transition: `height ${duration ? duration + 'ms' : '400ms'}`, | <mask> const provideSize = (layoutSize: any) => {
<mask> setSize(layoutSize.height);
<mask> };
<mask> const _web = {
<mask> transition: `height ${duration ?? '400'}ms`,
<mask> height: isOpen ? endingHeight || size : startingHeight || 0,
<mask> };
<mask>
<mask> return (
<mask> <Box
</s> fix: collapse duration fix and progress limit fix </s> remove <Box style={[triangle, additionalStyles, arrowProps.style]} {...rest}></Box>
</s> add <Box style={[triangle, additionalStyles, arrowProps.style]} {...rest} /> </s> remove { value, isIndeterminate, ...props }: IProgressProps,
</s> add { value = 0, isIndeterminate, ...props }: IProgressProps, </s> remove let newProps = useThemeProps('Progress', props);
</s> add const newProps = useThemeProps('Progress', props); </s> remove w: value + '%',
</s> add w: (value % 100) + '%', </s> remove <input {...inputProps} {...focusProps} ref={mergedRef}></input>
</s> add <input {...inputProps} {...focusProps} ref={mergedRef} /> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10b3dd16c7a4985d612243971f863d19dfc1c03d | src/components/composites/Collapse/index.tsx |
<Box style={[triangle, additionalStyles, arrowProps.style]} {...rest} /> | <mask> rest.borderBottomColor = rest.color;
<mask> }
<mask>
<mask> return (
<mask> <Box style={[triangle, additionalStyles, arrowProps.style]} {...rest}></Box>
<mask> );
<mask> };
<mask>
<mask> const getArrowStyles = (props: IArrowStyles) => {
<mask> let additionalStyles: any = {
</s> fix: collapse duration fix and progress limit fix </s> remove let newProps = useThemeProps('Progress', props);
</s> add const newProps = useThemeProps('Progress', props); </s> remove transition: `height ${duration ?? '400'}ms`,
</s> add transition: `height ${duration ? duration + 'ms' : '400ms'}`, </s> remove { value, isIndeterminate, ...props }: IProgressProps,
</s> add { value = 0, isIndeterminate, ...props }: IProgressProps, </s> remove <input {...inputProps} {...focusProps} ref={mergedRef}></input>
</s> add <input {...inputProps} {...focusProps} ref={mergedRef} /> </s> remove w: value + '%',
</s> add w: (value % 100) + '%', | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10b3dd16c7a4985d612243971f863d19dfc1c03d | src/components/composites/Popover/popover.tsx |
{ value = 0, isIndeterminate, ...props }: IProgressProps, | <mask> isIndeterminate?: any;
<mask> };
<mask>
<mask> const Progress = (
<mask> { value, isIndeterminate, ...props }: IProgressProps,
<mask> ref?: any
<mask> ) => {
<mask> // const width = new Animated.Value(0);
<mask> // useEffect(() => {
<mask> // Animated.loop(
</s> fix: collapse duration fix and progress limit fix </s> remove let newProps = useThemeProps('Progress', props);
</s> add const newProps = useThemeProps('Progress', props); </s> remove <Box style={[triangle, additionalStyles, arrowProps.style]} {...rest}></Box>
</s> add <Box style={[triangle, additionalStyles, arrowProps.style]} {...rest} /> </s> remove transition: `height ${duration ?? '400'}ms`,
</s> add transition: `height ${duration ? duration + 'ms' : '400ms'}`, </s> remove <input {...inputProps} {...focusProps} ref={mergedRef}></input>
</s> add <input {...inputProps} {...focusProps} ref={mergedRef} /> </s> remove w: value + '%',
</s> add w: (value % 100) + '%', | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10b3dd16c7a4985d612243971f863d19dfc1c03d | src/components/composites/Progress/index.tsx |
const newProps = useThemeProps('Progress', props); | <mask> // })
<mask> // ).start();
<mask> // });
<mask>
<mask> let newProps = useThemeProps('Progress', props);
<mask> const { innerBg } = newProps;
<mask> const innerProps = {
<mask> bg: innerBg,
<mask> shadow: 0,
<mask> rounded: newProps.rounded,
</s> fix: collapse duration fix and progress limit fix </s> remove { value, isIndeterminate, ...props }: IProgressProps,
</s> add { value = 0, isIndeterminate, ...props }: IProgressProps, </s> remove <Box style={[triangle, additionalStyles, arrowProps.style]} {...rest}></Box>
</s> add <Box style={[triangle, additionalStyles, arrowProps.style]} {...rest} /> </s> remove w: value + '%',
</s> add w: (value % 100) + '%', </s> remove transition: `height ${duration ?? '400'}ms`,
</s> add transition: `height ${duration ? duration + 'ms' : '400ms'}`, </s> remove <input {...inputProps} {...focusProps} ref={mergedRef}></input>
</s> add <input {...inputProps} {...focusProps} ref={mergedRef} /> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10b3dd16c7a4985d612243971f863d19dfc1c03d | src/components/composites/Progress/index.tsx |
w: (value % 100) + '%', | <mask> bg: innerBg,
<mask> shadow: 0,
<mask> rounded: newProps.rounded,
<mask> height: '100%',
<mask> w: value + '%',
<mask> display: 'flex',
<mask> alignItems: 'center',
<mask> justifyContent: 'center',
<mask> color: 'white',
<mask> };
</s> fix: collapse duration fix and progress limit fix </s> remove let newProps = useThemeProps('Progress', props);
</s> add const newProps = useThemeProps('Progress', props); </s> remove transition: `height ${duration ?? '400'}ms`,
</s> add transition: `height ${duration ? duration + 'ms' : '400ms'}`, </s> remove { value, isIndeterminate, ...props }: IProgressProps,
</s> add { value = 0, isIndeterminate, ...props }: IProgressProps, </s> remove <Box style={[triangle, additionalStyles, arrowProps.style]} {...rest}></Box>
</s> add <Box style={[triangle, additionalStyles, arrowProps.style]} {...rest} /> </s> remove <input {...inputProps} {...focusProps} ref={mergedRef}></input>
</s> add <input {...inputProps} {...focusProps} ref={mergedRef} /> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10b3dd16c7a4985d612243971f863d19dfc1c03d | src/components/composites/Progress/index.tsx |
<input {...inputProps} {...focusProps} ref={mergedRef} /> | <mask> outlineColor={activeColor}
<mask> outlineStyle={'solid'}
<mask> >
<mask> <VisuallyHidden>
<mask> <input {...inputProps} {...focusProps} ref={mergedRef}></input>
<mask> </VisuallyHidden>
<mask>
<mask> {component}
<mask> </Box>
<mask> ) : (
</s> fix: collapse duration fix and progress limit fix </s> remove transition: `height ${duration ?? '400'}ms`,
</s> add transition: `height ${duration ? duration + 'ms' : '400ms'}`, </s> remove { value, isIndeterminate, ...props }: IProgressProps,
</s> add { value = 0, isIndeterminate, ...props }: IProgressProps, </s> remove <Box style={[triangle, additionalStyles, arrowProps.style]} {...rest}></Box>
</s> add <Box style={[triangle, additionalStyles, arrowProps.style]} {...rest} /> </s> remove w: value + '%',
</s> add w: (value % 100) + '%', </s> remove let newProps = useThemeProps('Progress', props);
</s> add const newProps = useThemeProps('Progress', props); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10b3dd16c7a4985d612243971f863d19dfc1c03d | src/components/primitives/Checkbox/Checkbox.tsx |
import { IconButton, Icon, VStack } from 'native-base'; | <mask> import React from 'react';
<mask> import { IconButton, Icon } from 'native-base';
<mask> import { AntDesign } from '@expo/vector-icons';
<mask>
<mask> export const Example = () => {
<mask> return (
<mask> <IconButton
</s> fix: simplified API and support for internal prop </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { HStack, IconButton } from 'native-base'; </s> remove import { IconButton, Icon } from 'native-base';
</s> add import { IconButton, Icon, VStack } from 'native-base'; </s> remove import { HStack, IconButton, Icon, Box } from 'native-base';
</s> add import { HStack, IconButton, Box } from 'native-base';
import { MaterialIcons } from '@expo/vector-icons'; </s> remove import { Example as ButtonGroup } from './ButtonGroup';
</s> add | [
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10e2fd5937a34cb1ac9f30d3b339627f901134c5 | example/storybook/stories/components/composites/IconButton/Basic.tsx |
<VStack space={4}>
<IconButton
colorScheme="red"
variant="solid"
icon={<Icon as={AntDesign} name="search1" />}
_icon={{
color: 'amber.100',
}}
/>
<IconButton
colorScheme="emerald"
variant="outline"
_icon={{
as: AntDesign,
name: 'home',
}}
/>
</VStack> | <mask> import { AntDesign } from '@expo/vector-icons';
<mask>
<mask> export const Example = () => {
<mask> return (
<mask> <IconButton
<mask> variant="solid"
<mask> icon={<Icon size="md" as={<AntDesign name="search1" />} color="white" />}
<mask> />
<mask> );
<mask> };
</s> fix: simplified API and support for internal prop </s> remove icon={<Icon name={'menu'} color="white" size={size} />}
</s> add _icon={{
as: MaterialIcons,
name: 'menu',
}} </s> remove import { IconButton, Icon } from 'native-base';
</s> add import { IconButton, Icon, VStack } from 'native-base'; </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { HStack, IconButton } from 'native-base'; </s> remove import { HStack, IconButton, Icon, Box } from 'native-base';
</s> add import { HStack, IconButton, Box } from 'native-base';
import { MaterialIcons } from '@expo/vector-icons'; </s> remove import { IconButton, Icon } from 'native-base';
</s> add import { IconButton, Icon, VStack } from 'native-base'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10e2fd5937a34cb1ac9f30d3b339627f901134c5 | example/storybook/stories/components/composites/IconButton/Basic.tsx |
import { IconButton, Icon, VStack } from 'native-base'; | <mask> import React from 'react';
<mask> import { IconButton, Icon } from 'native-base';
<mask> import { Path, Circle } from 'react-native-svg';
<mask>
<mask> export const Example = () => {
<mask> return (
<mask> <IconButton
</s> fix: simplified API and support for internal prop </s> remove import { IconButton, Icon } from 'native-base';
</s> add import { IconButton, Icon, VStack } from 'native-base'; </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { HStack, IconButton } from 'native-base'; </s> remove import { HStack, IconButton, Icon, Box } from 'native-base';
</s> add import { HStack, IconButton, Box } from 'native-base';
import { MaterialIcons } from '@expo/vector-icons'; </s> remove import { Example as ButtonGroup } from './ButtonGroup';
</s> add | [
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10e2fd5937a34cb1ac9f30d3b339627f901134c5 | example/storybook/stories/components/composites/IconButton/SVGIcon.tsx |
<VStack space={4}>
{/* Suggested */}
<IconButton
variant="solid"
onPress={() => console.log('IconButton pressed')}
_icon={{
viewBox: '0 0 200 200',
color: 'blue.300',
size: 10,
strokeWidth: '10',
}}
>
<Path
fill="blue.300"
stroke="red.300"
strokeWidth="10"
d="M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0"
/>
<Circle cx="100" cy="100" r="50" fill="pink.200" />
</IconButton>
{/* Alternatively */}
<IconButton
variant="solid"
onPress={() => console.log('IconButton pressed')}
icon={
<Icon
viewBox="0 0 200 200"
color="blue.300"
size={10} | <mask> import { Path, Circle } from 'react-native-svg';
<mask>
<mask> export const Example = () => {
<mask> return (
<mask> <IconButton
<mask> variant="solid"
<mask> onPress={() => console.log('IconButton pressed')}
<mask> icon={
<mask> <Icon viewBox="0 0 200 200" color="blue.300" size={10} strokeWidth="10">
<mask> <Path
<mask> fill="blue.300"
<mask> stroke="red.300"
<mask> strokeWidth="10"
<mask> d="M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0"
<mask> />
<mask> <Circle cx="100" cy="100" r="50" fill="pink.200" />
<mask> </Icon>
</s> fix: simplified API and support for internal prop </s> remove d="M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0"
/>
<Circle cx="100" cy="100" r="50" fill="pink.200" />
</Icon>
}
/>
</s> add >
<Path
fill="blue.300"
stroke="red.300"
strokeWidth="10"
d="M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0"
/>
<Circle cx="100" cy="100" r="50" fill="pink.200" />
</Icon>
}
/>
</VStack> </s> remove import { IconButton, Icon } from 'native-base';
</s> add import { IconButton, Icon, VStack } from 'native-base'; </s> remove <IconButton
variant="solid"
icon={<Icon size="md" as={<AntDesign name="search1" />} color="white" />}
/>
</s> add <VStack space={4}>
<IconButton
colorScheme="red"
variant="solid"
icon={<Icon as={AntDesign} name="search1" />}
_icon={{
color: 'amber.100',
}}
/>
<IconButton
colorScheme="emerald"
variant="outline"
_icon={{
as: AntDesign,
name: 'home',
}}
/>
</VStack> </s> remove icon={
<Icon
size={4}
name="search1"
as={AntDesign}
color={variant === 'solid' ? 'white' : 'primary.500'}
/>
}
</s> add _icon={{
as: AntDesign,
name: 'search1',
}} </s> remove import { IconButton, Icon } from 'native-base';
</s> add import { IconButton, Icon, VStack } from 'native-base'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10e2fd5937a34cb1ac9f30d3b339627f901134c5 | example/storybook/stories/components/composites/IconButton/SVGIcon.tsx |
>
<Path
fill="blue.300"
stroke="red.300"
strokeWidth="10"
d="M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0"
/>
<Circle cx="100" cy="100" r="50" fill="pink.200" />
</Icon>
}
/>
</VStack> | <mask> <Path
<mask> fill="blue.300"
<mask> stroke="red.300"
<mask> strokeWidth="10"
<mask> d="M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0"
<mask> />
<mask> <Circle cx="100" cy="100" r="50" fill="pink.200" />
<mask> </Icon>
<mask> }
<mask> />
<mask> );
<mask> };
</s> fix: simplified API and support for internal prop </s> remove <IconButton
variant="solid"
onPress={() => console.log('IconButton pressed')}
icon={
<Icon viewBox="0 0 200 200" color="blue.300" size={10} strokeWidth="10">
<Path
fill="blue.300"
stroke="red.300"
</s> add <VStack space={4}>
{/* Suggested */}
<IconButton
variant="solid"
onPress={() => console.log('IconButton pressed')}
_icon={{
viewBox: '0 0 200 200',
color: 'blue.300',
size: 10,
strokeWidth: '10',
}}
>
<Path
fill="blue.300"
stroke="red.300"
strokeWidth="10"
d="M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0"
/>
<Circle cx="100" cy="100" r="50" fill="pink.200" />
</IconButton>
{/* Alternatively */}
<IconButton
variant="solid"
onPress={() => console.log('IconButton pressed')}
icon={
<Icon
viewBox="0 0 200 200"
color="blue.300"
size={10} </s> remove icon={
<Icon
size={4}
name="search1"
as={AntDesign}
color={variant === 'solid' ? 'white' : 'primary.500'}
/>
}
</s> add _icon={{
as: AntDesign,
name: 'search1',
}} </s> remove <IconButton
variant="solid"
icon={<Icon size="md" as={<AntDesign name="search1" />} color="white" />}
/>
</s> add <VStack space={4}>
<IconButton
colorScheme="red"
variant="solid"
icon={<Icon as={AntDesign} name="search1" />}
_icon={{
color: 'amber.100',
}}
/>
<IconButton
colorScheme="emerald"
variant="outline"
_icon={{
as: AntDesign,
name: 'home',
}}
/>
</VStack> </s> remove icon={<Icon name={'menu'} color="white" size={size} />}
</s> add _icon={{
as: MaterialIcons,
name: 'menu',
}} </s> remove const IconButton = ({ icon, ...props }: IIconButtonProps, ref: any) => {
const newProps = usePropsResolution('IconButton', props);
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10e2fd5937a34cb1ac9f30d3b339627f901134c5 | example/storybook/stories/components/composites/IconButton/SVGIcon.tsx |
import { HStack, IconButton, Box } from 'native-base';
import { MaterialIcons } from '@expo/vector-icons'; | <mask> import React from 'react';
<mask> import { HStack, IconButton, Icon, Box } from 'native-base';
<mask> export const Example = () => {
<mask> return (
<mask> <HStack space={2}>
<mask> {['sm', 'md', 'lg'].map((size: any) => (
<mask> <Box>
</s> fix: simplified API and support for internal prop </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { HStack, IconButton } from 'native-base'; </s> remove import { IconButton, Icon } from 'native-base';
</s> add import { IconButton, Icon, VStack } from 'native-base'; </s> remove import { IconButton, Icon } from 'native-base';
</s> add import { IconButton, Icon, VStack } from 'native-base'; </s> remove export interface IIconButtonProps extends IButtonProps {
/**
* The icon to be used. Refer to the Icon section of the docs for the available icon options.
*/
icon: JSX.Element;
}
</s> add const IconButton = (
{ icon, children, ...props }: IIconButtonProps,
ref: any
) => {
const { _icon, ...resolvedProps } = usePropsResolution('IconButton', props);
let clonedIcon;
if (icon) {
clonedIcon = React.cloneElement(icon, {
..._icon,
});
} | [
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10e2fd5937a34cb1ac9f30d3b339627f901134c5 | example/storybook/stories/components/composites/IconButton/Sizes.tsx |
_icon={{
as: MaterialIcons,
name: 'menu',
}} | <mask> <Box>
<mask> <IconButton
<mask> size={size}
<mask> variant="solid"
<mask> icon={<Icon name={'menu'} color="white" size={size} />}
<mask> />
<mask> </Box>
<mask> ))}
<mask> </HStack>
<mask> );
</s> fix: simplified API and support for internal prop </s> remove <IconButton
variant="solid"
icon={<Icon size="md" as={<AntDesign name="search1" />} color="white" />}
/>
</s> add <VStack space={4}>
<IconButton
colorScheme="red"
variant="solid"
icon={<Icon as={AntDesign} name="search1" />}
_icon={{
color: 'amber.100',
}}
/>
<IconButton
colorScheme="emerald"
variant="outline"
_icon={{
as: AntDesign,
name: 'home',
}}
/>
</VStack> </s> remove icon={
<Icon
size={4}
name="search1"
as={AntDesign}
color={variant === 'solid' ? 'white' : 'primary.500'}
/>
}
</s> add _icon={{
as: AntDesign,
name: 'search1',
}} </s> remove <IconButton
variant="solid"
onPress={() => console.log('IconButton pressed')}
icon={
<Icon viewBox="0 0 200 200" color="blue.300" size={10} strokeWidth="10">
<Path
fill="blue.300"
stroke="red.300"
</s> add <VStack space={4}>
{/* Suggested */}
<IconButton
variant="solid"
onPress={() => console.log('IconButton pressed')}
_icon={{
viewBox: '0 0 200 200',
color: 'blue.300',
size: 10,
strokeWidth: '10',
}}
>
<Path
fill="blue.300"
stroke="red.300"
strokeWidth="10"
d="M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0"
/>
<Circle cx="100" cy="100" r="50" fill="pink.200" />
</IconButton>
{/* Alternatively */}
<IconButton
variant="solid"
onPress={() => console.log('IconButton pressed')}
icon={
<Icon
viewBox="0 0 200 200"
color="blue.300"
size={10} </s> remove d="M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0"
/>
<Circle cx="100" cy="100" r="50" fill="pink.200" />
</Icon>
}
/>
</s> add >
<Path
fill="blue.300"
stroke="red.300"
strokeWidth="10"
d="M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0"
/>
<Circle cx="100" cy="100" r="50" fill="pink.200" />
</Icon>
}
/>
</VStack> </s> remove import { HStack, IconButton, Icon, Box } from 'native-base';
</s> add import { HStack, IconButton, Box } from 'native-base';
import { MaterialIcons } from '@expo/vector-icons'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10e2fd5937a34cb1ac9f30d3b339627f901134c5 | example/storybook/stories/components/composites/IconButton/Sizes.tsx |
import { HStack, IconButton } from 'native-base'; | <mask> import React from 'react';
<mask> import { HStack, IconButton, Icon } from 'native-base';
<mask> import { AntDesign } from '@expo/vector-icons';
<mask> export const Example = () => {
<mask> return (
<mask> <HStack space={4}>
<mask> {['outline', 'solid', 'ghost'].map((variant: any) => (
</s> fix: simplified API and support for internal prop </s> remove import { HStack, IconButton, Icon, Box } from 'native-base';
</s> add import { HStack, IconButton, Box } from 'native-base';
import { MaterialIcons } from '@expo/vector-icons'; </s> remove import { IconButton, Icon } from 'native-base';
</s> add import { IconButton, Icon, VStack } from 'native-base'; </s> remove import { IconButton, Icon } from 'native-base';
</s> add import { IconButton, Icon, VStack } from 'native-base'; </s> remove <IconButton
variant="solid"
icon={<Icon size="md" as={<AntDesign name="search1" />} color="white" />}
/>
</s> add <VStack space={4}>
<IconButton
colorScheme="red"
variant="solid"
icon={<Icon as={AntDesign} name="search1" />}
_icon={{
color: 'amber.100',
}}
/>
<IconButton
colorScheme="emerald"
variant="outline"
_icon={{
as: AntDesign,
name: 'home',
}}
/>
</VStack> | [
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10e2fd5937a34cb1ac9f30d3b339627f901134c5 | example/storybook/stories/components/composites/IconButton/Variant.tsx |
colorScheme="amber" | <mask> <HStack space={4}>
<mask> {['outline', 'solid', 'ghost'].map((variant: any) => (
<mask> <IconButton
<mask> key={variant}
<mask> variant={variant}
<mask> _icon={{
<mask> as: AntDesign,
<mask> name: 'search1',
<mask> }}
</s> fix: simplified API and support for internal prop </s> remove icon={
<Icon
size={4}
name="search1"
as={AntDesign}
color={variant === 'solid' ? 'white' : 'primary.500'}
/>
}
</s> add _icon={{
as: AntDesign,
name: 'search1',
}} </s> remove <IconButton
variant="solid"
icon={<Icon size="md" as={<AntDesign name="search1" />} color="white" />}
/>
</s> add <VStack space={4}>
<IconButton
colorScheme="red"
variant="solid"
icon={<Icon as={AntDesign} name="search1" />}
_icon={{
color: 'amber.100',
}}
/>
<IconButton
colorScheme="emerald"
variant="outline"
_icon={{
as: AntDesign,
name: 'home',
}}
/>
</VStack> </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { HStack, IconButton } from 'native-base'; </s> remove icon={<Icon name={'menu'} color="white" size={size} />}
</s> add _icon={{
as: MaterialIcons,
name: 'menu',
}} </s> remove <IconButton
variant="solid"
onPress={() => console.log('IconButton pressed')}
icon={
<Icon viewBox="0 0 200 200" color="blue.300" size={10} strokeWidth="10">
<Path
fill="blue.300"
stroke="red.300"
</s> add <VStack space={4}>
{/* Suggested */}
<IconButton
variant="solid"
onPress={() => console.log('IconButton pressed')}
_icon={{
viewBox: '0 0 200 200',
color: 'blue.300',
size: 10,
strokeWidth: '10',
}}
>
<Path
fill="blue.300"
stroke="red.300"
strokeWidth="10"
d="M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0"
/>
<Circle cx="100" cy="100" r="50" fill="pink.200" />
</IconButton>
{/* Alternatively */}
<IconButton
variant="solid"
onPress={() => console.log('IconButton pressed')}
icon={
<Icon
viewBox="0 0 200 200"
color="blue.300"
size={10} | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10e2fd5937a34cb1ac9f30d3b339627f901134c5 | example/storybook/stories/components/composites/IconButton/Variant.tsx |
_icon={{
as: AntDesign,
name: 'search1',
}} | <mask> {['outline', 'solid', 'ghost'].map((variant: any) => (
<mask> <IconButton
<mask> key={variant}
<mask> variant={variant}
<mask> icon={
<mask> <Icon
<mask> size={4}
<mask> name="search1"
<mask> as={AntDesign}
<mask> color={variant === 'solid' ? 'white' : 'primary.500'}
<mask> />
<mask> }
<mask> />
<mask> ))}
<mask> </HStack>
<mask> );
<mask> };
</s> fix: simplified API and support for internal prop </s> remove <IconButton
variant="solid"
icon={<Icon size="md" as={<AntDesign name="search1" />} color="white" />}
/>
</s> add <VStack space={4}>
<IconButton
colorScheme="red"
variant="solid"
icon={<Icon as={AntDesign} name="search1" />}
_icon={{
color: 'amber.100',
}}
/>
<IconButton
colorScheme="emerald"
variant="outline"
_icon={{
as: AntDesign,
name: 'home',
}}
/>
</VStack> </s> remove icon={<Icon name={'menu'} color="white" size={size} />}
</s> add _icon={{
as: MaterialIcons,
name: 'menu',
}} </s> remove <IconButton
variant="solid"
onPress={() => console.log('IconButton pressed')}
icon={
<Icon viewBox="0 0 200 200" color="blue.300" size={10} strokeWidth="10">
<Path
fill="blue.300"
stroke="red.300"
</s> add <VStack space={4}>
{/* Suggested */}
<IconButton
variant="solid"
onPress={() => console.log('IconButton pressed')}
_icon={{
viewBox: '0 0 200 200',
color: 'blue.300',
size: 10,
strokeWidth: '10',
}}
>
<Path
fill="blue.300"
stroke="red.300"
strokeWidth="10"
d="M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0"
/>
<Circle cx="100" cy="100" r="50" fill="pink.200" />
</IconButton>
{/* Alternatively */}
<IconButton
variant="solid"
onPress={() => console.log('IconButton pressed')}
icon={
<Icon
viewBox="0 0 200 200"
color="blue.300"
size={10} </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { HStack, IconButton } from 'native-base'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10e2fd5937a34cb1ac9f30d3b339627f901134c5 | example/storybook/stories/components/composites/IconButton/Variant.tsx |
<mask> import React from 'react';
<mask> import { storiesOf } from '@storybook/react-native';
<mask> import { withKnobs } from '@storybook/addon-knobs';
<mask> import { Example as ButtonGroup } from './ButtonGroup';
<mask> import { Example as WithRef } from './WithRef';
<mask> import { Example as Sizes } from './sizes';
<mask> import { Example as Basic } from './basic';
<mask> import { Example as Variants } from './variants';
<mask> import { Example as Loading } from './loading';
</s> fix: simplified API and support for internal prop </s> remove import { IconButton, Icon } from 'native-base';
</s> add import { IconButton, Icon, VStack } from 'native-base'; </s> remove import { IconButton, Icon } from 'native-base';
</s> add import { IconButton, Icon, VStack } from 'native-base'; </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { HStack, IconButton } from 'native-base'; </s> remove import { HStack, IconButton, Icon, Box } from 'native-base';
</s> add import { HStack, IconButton, Box } from 'native-base';
import { MaterialIcons } from '@expo/vector-icons'; | [
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10e2fd5937a34cb1ac9f30d3b339627f901134c5 | example/storybook/stories/components/primitives/Button/index.tsx | |
<mask> .add('Variants', () => <Variants />)
<mask> .add('Sizes', () => <Sizes />)
<mask> .add('Loading', () => <Loading />)
<mask> .add('Icons', () => <Icons />)
<mask> .add('ButtonGroup', () => <ButtonGroup />)
<mask> .add('Composition', () => <Composition />)
<mask> .add('WithRef', () => <WithRef />);
</s> fix: simplified API and support for internal prop </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { HStack, IconButton } from 'native-base'; </s> remove import { HStack, IconButton, Icon, Box } from 'native-base';
</s> add import { HStack, IconButton, Box } from 'native-base';
import { MaterialIcons } from '@expo/vector-icons'; </s> remove import { IconButton, Icon } from 'native-base';
</s> add import { IconButton, Icon, VStack } from 'native-base'; </s> remove import { IconButton, Icon } from 'native-base';
</s> add import { IconButton, Icon, VStack } from 'native-base'; </s> remove <IconButton
variant="solid"
icon={<Icon size="md" as={<AntDesign name="search1" />} color="white" />}
/>
</s> add <VStack space={4}>
<IconButton
colorScheme="red"
variant="solid"
icon={<Icon as={AntDesign} name="search1" />}
_icon={{
color: 'amber.100',
}}
/>
<IconButton
colorScheme="emerald"
variant="outline"
_icon={{
as: AntDesign,
name: 'home',
}}
/>
</VStack> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10e2fd5937a34cb1ac9f30d3b339627f901134c5 | example/storybook/stories/components/primitives/Button/index.tsx | |
import { Pressable } from '../../primitives/Pressable';
import { Icon } from '../../primitives/Icon'; | <mask> import React, { memo, forwardRef } from 'react';
<mask> import { Button, IButtonProps } from '../../primitives/Button';
<mask> import { usePropsResolution } from '../../../hooks/useThemeProps';
<mask>
<mask> export interface IIconButtonProps extends IButtonProps {
<mask> /**
<mask> * The icon to be used. Refer to the Icon section of the docs for the available icon options.
</s> fix: simplified API and support for internal prop </s> remove export interface IIconButtonProps extends IButtonProps {
/**
* The icon to be used. Refer to the Icon section of the docs for the available icon options.
*/
icon: JSX.Element;
}
</s> add const IconButton = (
{ icon, children, ...props }: IIconButtonProps,
ref: any
) => {
const { _icon, ...resolvedProps } = usePropsResolution('IconButton', props);
let clonedIcon;
if (icon) {
clonedIcon = React.cloneElement(icon, {
..._icon,
});
} </s> remove import { IconButton, Icon } from 'native-base';
</s> add import { IconButton, Icon, VStack } from 'native-base'; </s> remove import { Example as ButtonGroup } from './ButtonGroup';
</s> add </s> remove import { IconButton, Icon } from 'native-base';
</s> add import { IconButton, Icon, VStack } from 'native-base'; | [
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10e2fd5937a34cb1ac9f30d3b339627f901134c5 | src/components/composites/IconButton/index.tsx |
import type { IIconButtonProps } from './types'; | <mask> import React, { memo, forwardRef } from 'react';
<mask> import { Pressable } from '../../primitives/Pressable';
<mask> import { Icon } from '../../primitives/Icon';
<mask> import { usePropsResolution } from '../../../hooks/useThemeProps';
<mask>
<mask> const IconButton = (
<mask> { icon, children, ...props }: IIconButtonProps,
<mask> ref: any
<mask> ) => {
</s> fix: simplified API and support for internal prop </s> remove export interface IIconButtonProps extends IButtonProps {
/**
* The icon to be used. Refer to the Icon section of the docs for the available icon options.
*/
icon: JSX.Element;
}
</s> add const IconButton = (
{ icon, children, ...props }: IIconButtonProps,
ref: any
) => {
const { _icon, ...resolvedProps } = usePropsResolution('IconButton', props);
let clonedIcon;
if (icon) {
clonedIcon = React.cloneElement(icon, {
..._icon,
});
} </s> remove import { Button, IButtonProps } from '../../primitives/Button';
</s> add import { Pressable } from '../../primitives/Pressable';
import { Icon } from '../../primitives/Icon'; </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { HStack, IconButton } from 'native-base'; </s> remove import { IconButton, Icon } from 'native-base';
</s> add import { IconButton, Icon, VStack } from 'native-base'; </s> remove import { IconButton, Icon } from 'native-base';
</s> add import { IconButton, Icon, VStack } from 'native-base'; | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10e2fd5937a34cb1ac9f30d3b339627f901134c5 | src/components/composites/IconButton/index.tsx |
const IconButton = (
{ icon, children, ...props }: IIconButtonProps,
ref: any
) => {
const { _icon, ...resolvedProps } = usePropsResolution('IconButton', props);
let clonedIcon;
if (icon) {
clonedIcon = React.cloneElement(icon, {
..._icon,
});
} | <mask> import React, { memo, forwardRef } from 'react';
<mask> import { Button, IButtonProps } from '../../primitives/Button';
<mask> import { usePropsResolution } from '../../../hooks/useThemeProps';
<mask>
<mask> export interface IIconButtonProps extends IButtonProps {
<mask> /**
<mask> * The icon to be used. Refer to the Icon section of the docs for the available icon options.
<mask> */
<mask> icon: JSX.Element;
<mask> }
<mask>
<mask> const IconButton = ({ icon, ...props }: IIconButtonProps, ref: any) => {
<mask> const newProps = usePropsResolution('IconButton', props);
<mask> return (
<mask> <Button ref={ref} {...newProps}>
</s> fix: simplified API and support for internal prop </s> remove import { Button, IButtonProps } from '../../primitives/Button';
</s> add import { Pressable } from '../../primitives/Pressable';
import { Icon } from '../../primitives/Icon'; </s> remove const IconButton = ({ icon, ...props }: IIconButtonProps, ref: any) => {
const newProps = usePropsResolution('IconButton', props);
</s> add </s> remove <Button ref={ref} {...newProps}>
{icon}
</Button>
</s> add <Pressable ref={ref} {...resolvedProps}>
{clonedIcon || <Icon {..._icon}>{children}</Icon>}
</Pressable> </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { HStack, IconButton } from 'native-base'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10e2fd5937a34cb1ac9f30d3b339627f901134c5 | src/components/composites/IconButton/index.tsx |
<mask> */
<mask> icon: JSX.Element;
<mask> }
<mask>
<mask> const IconButton = ({ icon, ...props }: IIconButtonProps, ref: any) => {
<mask> const newProps = usePropsResolution('IconButton', props);
<mask> return (
<mask> <Button ref={ref} {...newProps}>
<mask> {icon}
<mask> </Button>
<mask> );
</s> fix: simplified API and support for internal prop </s> remove <Button ref={ref} {...newProps}>
{icon}
</Button>
</s> add <Pressable ref={ref} {...resolvedProps}>
{clonedIcon || <Icon {..._icon}>{children}</Icon>}
</Pressable> </s> remove export interface IIconButtonProps extends IButtonProps {
/**
* The icon to be used. Refer to the Icon section of the docs for the available icon options.
*/
icon: JSX.Element;
}
</s> add const IconButton = (
{ icon, children, ...props }: IIconButtonProps,
ref: any
) => {
const { _icon, ...resolvedProps } = usePropsResolution('IconButton', props);
let clonedIcon;
if (icon) {
clonedIcon = React.cloneElement(icon, {
..._icon,
});
} </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { HStack, IconButton } from 'native-base'; </s> remove import { HStack, IconButton, Icon, Box } from 'native-base';
</s> add import { HStack, IconButton, Box } from 'native-base';
import { MaterialIcons } from '@expo/vector-icons'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10e2fd5937a34cb1ac9f30d3b339627f901134c5 | src/components/composites/IconButton/index.tsx | |
<Pressable ref={ref} {...resolvedProps}>
{clonedIcon || <Icon {..._icon}>{children}</Icon>}
</Pressable> | <mask>
<mask> const IconButton = ({ icon, ...props }: IIconButtonProps, ref: any) => {
<mask> const newProps = usePropsResolution('IconButton', props);
<mask> return (
<mask> <Button ref={ref} {...newProps}>
<mask> {icon}
<mask> </Button>
<mask> );
<mask> };
<mask>
<mask> export default memo(forwardRef(IconButton));
</s> fix: simplified API and support for internal prop </s> remove const IconButton = ({ icon, ...props }: IIconButtonProps, ref: any) => {
const newProps = usePropsResolution('IconButton', props);
</s> add </s> remove export interface IIconButtonProps extends IButtonProps {
/**
* The icon to be used. Refer to the Icon section of the docs for the available icon options.
*/
icon: JSX.Element;
}
</s> add const IconButton = (
{ icon, children, ...props }: IIconButtonProps,
ref: any
) => {
const { _icon, ...resolvedProps } = usePropsResolution('IconButton', props);
let clonedIcon;
if (icon) {
clonedIcon = React.cloneElement(icon, {
..._icon,
});
} </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { HStack, IconButton } from 'native-base'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10e2fd5937a34cb1ac9f30d3b339627f901134c5 | src/components/composites/IconButton/index.tsx |
import { Dict, mode, transparentize } from './../tools';
import { Platform } from 'react-native';
const baseStyle = (props: any) => {
const { primary } = props.theme.colors;
const focusRing =
Platform.OS === 'web'
? { boxShadow: `${primary[400]} 0px 0px 0px 3px` }
: {};
return {
borderRadius: 'lg',
_web: {
cursor: props.isDisabled
? 'not-allowed'
: props.isLoading
? 'default'
: 'pointer',
},
_focusVisible: {
style: props.variant !== 'unstyled' ? { ...focusRing } : {},
},
_disabled: {
opacity: 0.5,
},
};
};
function variantGhost(props: Dict) {
const { colorScheme } = props;
return {
bg: 'transparent',
_web: {
outlineWidth: 0,
},
_hover: {
bg: transparentize(
mode(`${colorScheme}.200`, `${colorScheme}.500`)(props),
0.5
)(props.theme),
},
_focusVisible: {
bg: transparentize(
mode(`${colorScheme}.200`, `${colorScheme}.500`)(props),
0.5
)(props.theme),
},
_pressed: {
bg: transparentize(
mode(`${colorScheme}.200`, `${colorScheme}.500`)(props),
0.6
)(props.theme),
},
};
}
function variantOutline(props: Dict) {
const { colorScheme } = props;
return {
border: '1px solid',
borderColor: `${colorScheme}.500`,
_icon: {
color: `${colorScheme}.500`,
},
_web: {
outlineWidth: 0,
},
_hover: {
bg: transparentize(
mode(`${colorScheme}.200`, `${colorScheme}.500`)(props),
0.5
)(props.theme),
},
_focusVisible: {
bg: transparentize(
mode(`${colorScheme}.200`, `${colorScheme}.500`)(props),
0.5
)(props.theme),
},
_pressed: {
bg: transparentize(
mode(`${colorScheme}.200`, `${colorScheme}.500`)(props),
0.6
)(props.theme),
},
};
}
function variantSolid(props: Dict) {
const { colorScheme } = props;
return {
bg: mode(`${colorScheme}.500`, `${colorScheme}.400`)(props),
_web: {
outlineWidth: 0,
},
_disabled: {
bg: mode(`muted.300`, `muted.500`)(props),
},
_hover: {
bg: mode(`${colorScheme}.600`, `${colorScheme}.500`)(props),
},
_pressed: {
bg: mode(`${colorScheme}.700`, `${colorScheme}.600`)(props),
},
_icon: {
color: mode('gray.50', 'gray.800')(props),
},
};
}
function variantUnstyled() {
return {};
}
const variants = {
ghost: variantGhost,
outline: variantOutline,
solid: variantSolid,
unstyled: variantUnstyled, | <mask> const baseStyle = {
<mask> borderRadius: 'md',
<mask> };
<mask>
<mask> const defaultProps = {
<mask> variant: 'ghost',
<mask> size: 'md',
</s> fix: simplified API and support for internal prop </s> remove import { HStack, IconButton, Icon, Box } from 'native-base';
</s> add import { HStack, IconButton, Box } from 'native-base';
import { MaterialIcons } from '@expo/vector-icons'; </s> remove export interface IIconButtonProps extends IButtonProps {
/**
* The icon to be used. Refer to the Icon section of the docs for the available icon options.
*/
icon: JSX.Element;
}
</s> add const IconButton = (
{ icon, children, ...props }: IIconButtonProps,
ref: any
) => {
const { _icon, ...resolvedProps } = usePropsResolution('IconButton', props);
let clonedIcon;
if (icon) {
clonedIcon = React.cloneElement(icon, {
..._icon,
});
} </s> remove <Button ref={ref} {...newProps}>
{icon}
</Button>
</s> add <Pressable ref={ref} {...resolvedProps}>
{clonedIcon || <Icon {..._icon}>{children}</Icon>}
</Pressable> </s> remove const IconButton = ({ icon, ...props }: IIconButtonProps, ref: any) => {
const newProps = usePropsResolution('IconButton', props);
</s> add | [
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10e2fd5937a34cb1ac9f30d3b339627f901134c5 | src/theme/components/icon-button.ts |
colorScheme: 'primary', | <mask>
<mask> const defaultProps = {
<mask> variant: 'ghost',
<mask> size: 'md',
<mask> };
<mask>
<mask> const sizes = {
<mask> lg: {
<mask> p: 3,
<mask> },
</s> fix: simplified API and support for internal prop </s> remove const baseStyle = {
borderRadius: 'md',
</s> add import { Dict, mode, transparentize } from './../tools';
import { Platform } from 'react-native';
const baseStyle = (props: any) => {
const { primary } = props.theme.colors;
const focusRing =
Platform.OS === 'web'
? { boxShadow: `${primary[400]} 0px 0px 0px 3px` }
: {};
return {
borderRadius: 'lg',
_web: {
cursor: props.isDisabled
? 'not-allowed'
: props.isLoading
? 'default'
: 'pointer',
},
_focusVisible: {
style: props.variant !== 'unstyled' ? { ...focusRing } : {},
},
_disabled: {
opacity: 0.5,
},
};
};
function variantGhost(props: Dict) {
const { colorScheme } = props;
return {
bg: 'transparent',
_web: {
outlineWidth: 0,
},
_hover: {
bg: transparentize(
mode(`${colorScheme}.200`, `${colorScheme}.500`)(props),
0.5
)(props.theme),
},
_focusVisible: {
bg: transparentize(
mode(`${colorScheme}.200`, `${colorScheme}.500`)(props),
0.5
)(props.theme),
},
_pressed: {
bg: transparentize(
mode(`${colorScheme}.200`, `${colorScheme}.500`)(props),
0.6
)(props.theme),
},
};
}
function variantOutline(props: Dict) {
const { colorScheme } = props;
return {
border: '1px solid',
borderColor: `${colorScheme}.500`,
_icon: {
color: `${colorScheme}.500`,
},
_web: {
outlineWidth: 0,
},
_hover: {
bg: transparentize(
mode(`${colorScheme}.200`, `${colorScheme}.500`)(props),
0.5
)(props.theme),
},
_focusVisible: {
bg: transparentize(
mode(`${colorScheme}.200`, `${colorScheme}.500`)(props),
0.5
)(props.theme),
},
_pressed: {
bg: transparentize(
mode(`${colorScheme}.200`, `${colorScheme}.500`)(props),
0.6
)(props.theme),
},
};
}
function variantSolid(props: Dict) {
const { colorScheme } = props;
return {
bg: mode(`${colorScheme}.500`, `${colorScheme}.400`)(props),
_web: {
outlineWidth: 0,
},
_disabled: {
bg: mode(`muted.300`, `muted.500`)(props),
},
_hover: {
bg: mode(`${colorScheme}.600`, `${colorScheme}.500`)(props),
},
_pressed: {
bg: mode(`${colorScheme}.700`, `${colorScheme}.600`)(props),
},
_icon: {
color: mode('gray.50', 'gray.800')(props),
},
};
}
function variantUnstyled() {
return {};
}
const variants = {
ghost: variantGhost,
outline: variantOutline,
solid: variantSolid,
unstyled: variantUnstyled, </s> remove import { HStack, IconButton, Icon, Box } from 'native-base';
</s> add import { HStack, IconButton, Box } from 'native-base';
import { MaterialIcons } from '@expo/vector-icons'; </s> remove export interface IIconButtonProps extends IButtonProps {
/**
* The icon to be used. Refer to the Icon section of the docs for the available icon options.
*/
icon: JSX.Element;
}
</s> add const IconButton = (
{ icon, children, ...props }: IIconButtonProps,
ref: any
) => {
const { _icon, ...resolvedProps } = usePropsResolution('IconButton', props);
let clonedIcon;
if (icon) {
clonedIcon = React.cloneElement(icon, {
..._icon,
});
} </s> remove <Button ref={ref} {...newProps}>
{icon}
</Button>
</s> add <Pressable ref={ref} {...resolvedProps}>
{clonedIcon || <Icon {..._icon}>{children}</Icon>}
</Pressable> </s> remove import { IconButton, Icon } from 'native-base';
</s> add import { IconButton, Icon, VStack } from 'native-base'; | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10e2fd5937a34cb1ac9f30d3b339627f901134c5 | src/theme/components/icon-button.ts |
variants, | <mask> };
<mask>
<mask> export default {
<mask> baseStyle,
<mask> sizes,
<mask> defaultProps,
<mask> };
</s> fix: simplified API and support for internal prop </s> remove <Button ref={ref} {...newProps}>
{icon}
</Button>
</s> add <Pressable ref={ref} {...resolvedProps}>
{clonedIcon || <Icon {..._icon}>{children}</Icon>}
</Pressable> </s> remove const baseStyle = {
borderRadius: 'md',
</s> add import { Dict, mode, transparentize } from './../tools';
import { Platform } from 'react-native';
const baseStyle = (props: any) => {
const { primary } = props.theme.colors;
const focusRing =
Platform.OS === 'web'
? { boxShadow: `${primary[400]} 0px 0px 0px 3px` }
: {};
return {
borderRadius: 'lg',
_web: {
cursor: props.isDisabled
? 'not-allowed'
: props.isLoading
? 'default'
: 'pointer',
},
_focusVisible: {
style: props.variant !== 'unstyled' ? { ...focusRing } : {},
},
_disabled: {
opacity: 0.5,
},
};
};
function variantGhost(props: Dict) {
const { colorScheme } = props;
return {
bg: 'transparent',
_web: {
outlineWidth: 0,
},
_hover: {
bg: transparentize(
mode(`${colorScheme}.200`, `${colorScheme}.500`)(props),
0.5
)(props.theme),
},
_focusVisible: {
bg: transparentize(
mode(`${colorScheme}.200`, `${colorScheme}.500`)(props),
0.5
)(props.theme),
},
_pressed: {
bg: transparentize(
mode(`${colorScheme}.200`, `${colorScheme}.500`)(props),
0.6
)(props.theme),
},
};
}
function variantOutline(props: Dict) {
const { colorScheme } = props;
return {
border: '1px solid',
borderColor: `${colorScheme}.500`,
_icon: {
color: `${colorScheme}.500`,
},
_web: {
outlineWidth: 0,
},
_hover: {
bg: transparentize(
mode(`${colorScheme}.200`, `${colorScheme}.500`)(props),
0.5
)(props.theme),
},
_focusVisible: {
bg: transparentize(
mode(`${colorScheme}.200`, `${colorScheme}.500`)(props),
0.5
)(props.theme),
},
_pressed: {
bg: transparentize(
mode(`${colorScheme}.200`, `${colorScheme}.500`)(props),
0.6
)(props.theme),
},
};
}
function variantSolid(props: Dict) {
const { colorScheme } = props;
return {
bg: mode(`${colorScheme}.500`, `${colorScheme}.400`)(props),
_web: {
outlineWidth: 0,
},
_disabled: {
bg: mode(`muted.300`, `muted.500`)(props),
},
_hover: {
bg: mode(`${colorScheme}.600`, `${colorScheme}.500`)(props),
},
_pressed: {
bg: mode(`${colorScheme}.700`, `${colorScheme}.600`)(props),
},
_icon: {
color: mode('gray.50', 'gray.800')(props),
},
};
}
function variantUnstyled() {
return {};
}
const variants = {
ghost: variantGhost,
outline: variantOutline,
solid: variantSolid,
unstyled: variantUnstyled, </s> remove <IconButton
variant="solid"
icon={<Icon size="md" as={<AntDesign name="search1" />} color="white" />}
/>
</s> add <VStack space={4}>
<IconButton
colorScheme="red"
variant="solid"
icon={<Icon as={AntDesign} name="search1" />}
_icon={{
color: 'amber.100',
}}
/>
<IconButton
colorScheme="emerald"
variant="outline"
_icon={{
as: AntDesign,
name: 'home',
}}
/>
</VStack> </s> remove icon={
<Icon
size={4}
name="search1"
as={AntDesign}
color={variant === 'solid' ? 'white' : 'primary.500'}
/>
}
</s> add _icon={{
as: AntDesign,
name: 'search1',
}} | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10e2fd5937a34cb1ac9f30d3b339627f901134c5 | src/theme/components/icon-button.ts |
"@react-native-community/datetimepicker": "3.0.8", | <mask> "license": "Apache-2.0",
<mask> "private": false,
<mask> "dependencies": {
<mask> "@codler/react-native-keyboard-aware-scroll-view": "1.0.1",
<mask> "@react-native-community/datetimepicker": "^3.0.2",
<mask> "@react-native-community/picker": "^1.6.6",
<mask> "blueimp-md5": "^2.5.0",
<mask> "clamp": "^1.0.1",
<mask> "color": "~3.1.2",
<mask> "create-react-class": "^15.6.3",
</s> date picker value issue fix </s> remove if (checkboxType == "rounded") {
</s> add if (checkboxType === 'rounded') { </s> remove if (checkboxType == "square") {
</s> add if (checkboxType === 'square') { </s> remove
</s> add // eslint-disable-next-line class-methods-use-this </s> remove import {
Modal,
View
} from 'react-native';
</s> add import { Modal, View } from 'react-native'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10ff0166b3219b598c85008a3fb30d6ecdee41e0 | package.json |
// eslint-disable-next-line class-methods-use-this | <mask> }
<mask> };
<mask> }
<mask>
<mask>
<mask> getBorderRadius(checkboxType, variables) {
<mask> if (checkboxType == "rounded") {
<mask> return 13;
<mask> }
<mask> if (checkboxType == "square") {
</s> date picker value issue fix </s> remove if (checkboxType == "rounded") {
</s> add if (checkboxType === 'rounded') { </s> remove if (checkboxType == "square") {
</s> add if (checkboxType === 'square') { </s> remove import {
Modal,
View
} from 'react-native';
</s> add import { Modal, View } from 'react-native'; </s> remove "@react-native-community/datetimepicker": "^3.0.2",
</s> add "@react-native-community/datetimepicker": "3.0.8", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10ff0166b3219b598c85008a3fb30d6ecdee41e0 | src/basic/Checkbox.js |
if (checkboxType === 'rounded') { | <mask> }
<mask>
<mask>
<mask> getBorderRadius(checkboxType, variables) {
<mask> if (checkboxType == "rounded") {
<mask> return 13;
<mask> }
<mask> if (checkboxType == "square") {
<mask> return 0;
<mask> }
</s> date picker value issue fix </s> remove if (checkboxType == "square") {
</s> add if (checkboxType === 'square') { </s> remove
</s> add // eslint-disable-next-line class-methods-use-this </s> remove import {
Modal,
View
} from 'react-native';
</s> add import { Modal, View } from 'react-native'; </s> remove "@react-native-community/datetimepicker": "^3.0.2",
</s> add "@react-native-community/datetimepicker": "3.0.8", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10ff0166b3219b598c85008a3fb30d6ecdee41e0 | src/basic/Checkbox.js |
if (checkboxType === 'square') { | <mask> getBorderRadius(checkboxType, variables) {
<mask> if (checkboxType == "rounded") {
<mask> return 13;
<mask> }
<mask> if (checkboxType == "square") {
<mask> return 0;
<mask> }
<mask> return variables.CheckboxRadius;
<mask> }
<mask>
</s> date picker value issue fix </s> remove if (checkboxType == "rounded") {
</s> add if (checkboxType === 'rounded') { </s> remove
</s> add // eslint-disable-next-line class-methods-use-this </s> remove import {
Modal,
View
} from 'react-native';
</s> add import { Modal, View } from 'react-native'; </s> remove "@react-native-community/datetimepicker": "^3.0.2",
</s> add "@react-native-community/datetimepicker": "3.0.8", | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10ff0166b3219b598c85008a3fb30d6ecdee41e0 | src/basic/Checkbox.js |
import { Modal, View } from 'react-native'; | <mask> import React from 'react';
<mask> import {
<mask> Modal,
<mask> View
<mask> } from 'react-native';
<mask>
<mask> import DateTimePicker from '@react-native-community/datetimepicker';
<mask>
<mask> import variable from '../theme/variables/platform';
<mask>
</s> date picker value issue fix </s> remove if (checkboxType == "rounded") {
</s> add if (checkboxType === 'rounded') { </s> remove
</s> add // eslint-disable-next-line class-methods-use-this </s> remove if (checkboxType == "square") {
</s> add if (checkboxType === 'square') { </s> remove "@react-native-community/datetimepicker": "^3.0.2",
</s> add "@react-native-community/datetimepicker": "3.0.8", | [
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10ff0166b3219b598c85008a3fb30d6ecdee41e0 | src/basic/DatePicker.js |
{...this.props} | <mask> maximumDate={maximumDate}
<mask> mode="date"
<mask> locale={locale}
<mask> timeZoneOffsetInMinutes={timeZoneOffsetInMinutes}
<mask> />
<mask> </Modal>
<mask> </View>
<mask> </View>
<mask> </View>
<mask> );
</s> date picker value issue fix </s> remove import {
Modal,
View
} from 'react-native';
</s> add import { Modal, View } from 'react-native'; </s> remove if (checkboxType == "square") {
</s> add if (checkboxType === 'square') { </s> remove if (checkboxType == "rounded") {
</s> add if (checkboxType === 'rounded') { </s> remove
</s> add // eslint-disable-next-line class-methods-use-this </s> remove "@react-native-community/datetimepicker": "^3.0.2",
</s> add "@react-native-community/datetimepicker": "3.0.8", | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/10ff0166b3219b598c85008a3fb30d6ecdee41e0 | src/basic/DatePicker.js |
import { Button, VStack, HStack, AddIcon } from 'native-base'; | <mask> import React from 'react';
<mask> import { Button, Box, VStack } from 'native-base';
<mask>
<mask> export const Example = () => {
<mask> return (
<mask> <VStack space={4} alignItems="center">
<mask> {['xs', 'sm', 'md', 'lg'].map((size) => (
</s> feat: _icon internal prop and design changes for button and divider </s> remove <Box>
{/* @ts-ignore */}
<Button key={size} size={size}>
</s> add <HStack space="4">
<Button size={size}>BUTTON</Button>
<Button size={size} leftIcon={<AddIcon />}> </s> remove import { Dict, mode, transparentize } from './../tools';
import { Platform } from 'react-native';
const disabledTextColor = (props: any) => mode(`muted.500`, `muted.300`)(props);
</s> add import { Dict, mode } from './../tools'; </s> remove import { mode } from '../tools';
</s> add </s> remove const spinnerElement = spinner ? (
spinner
) : (
<Spinner color={_text?.color} {..._spinner} />
);
</s> add const spinnerElement = spinner ? spinner : <Spinner {..._spinner} />; | [
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | example/storybook/stories/components/primitives/Button/sizes.tsx |
<HStack space="4">
<Button size={size}>BUTTON</Button>
<Button size={size} leftIcon={<AddIcon />}> | <mask> export const Example = () => {
<mask> return (
<mask> <VStack space={4} alignItems="center">
<mask> {['xs', 'sm', 'md', 'lg'].map((size) => (
<mask> <Box>
<mask> {/* @ts-ignore */}
<mask> <Button key={size} size={size}>
<mask> BUTTON
<mask> </Button>
<mask> </Box>
<mask> ))}
<mask> </VStack>
</s> feat: _icon internal prop and design changes for button and divider </s> remove </Box>
</s> add <Button size={size} rightIcon={<AddIcon />}>
BUTTON
</Button>
<Button size={size} isLoading>
BUTTON
</Button>
</HStack> </s> remove import { Button, Box, VStack } from 'native-base';
</s> add import { Button, VStack, HStack, AddIcon } from 'native-base'; </s> remove const spinnerElement = spinner ? (
spinner
) : (
<Spinner color={_text?.color} {..._spinner} />
);
</s> add const spinnerElement = spinner ? spinner : <Spinner {..._spinner} />; </s> remove variant: 'solid',
</s> add variant: 'link', </s> remove const focusRing =
Platform.OS === 'web'
? mode(
{ boxShadow: `${primary[400]} 0px 0px 0px 2px`, zIndex: 1 },
{ boxShadow: `${primary[500]} 0px 0px 0px 2px`, zIndex: 1 }
)(props)
: {};
</s> add const focusRing = mode(
{
boxShadow: `${primary[400]} 0px 0px 0px 2px`,
},
{
boxShadow: `${primary[500]} 0px 0px 0px 2px`,
}
)(props); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | example/storybook/stories/components/primitives/Button/sizes.tsx |
<Button size={size} rightIcon={<AddIcon />}>
BUTTON
</Button>
<Button size={size} isLoading>
BUTTON
</Button>
</HStack> | <mask> {/* @ts-ignore */}
<mask> <Button key={size} size={size}>
<mask> BUTTON
<mask> </Button>
<mask> </Box>
<mask> ))}
<mask> </VStack>
<mask> );
<mask> };
</s> feat: _icon internal prop and design changes for button and divider </s> remove <Box>
{/* @ts-ignore */}
<Button key={size} size={size}>
</s> add <HStack space="4">
<Button size={size}>BUTTON</Button>
<Button size={size} leftIcon={<AddIcon />}> </s> remove ..._text,
</s> add ..._icon, </s> remove ..._text,
</s> add ..._icon, </s> remove const spinnerElement = spinner ? (
spinner
) : (
<Spinner color={_text?.color} {..._spinner} />
);
</s> add const spinnerElement = spinner ? spinner : <Spinner {..._spinner} />; </s> remove variant: 'solid',
</s> add variant: 'link', | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | example/storybook/stories/components/primitives/Button/sizes.tsx |
_icon, | <mask> onBlur,
<mask> _text,
<mask> _stack,
<mask> _spinner,
<mask> isLoadingText,
<mask> ...resolvedProps
<mask> } = usePropsResolution('Button', props, {
<mask> isDisabled,
<mask> isHovered: isHoveredProp || isHovered,
</s> feat: _icon internal prop and design changes for button and divider </s> remove // function getBg(props: Record<string, any>) {
// const { theme, status, variant } = props;
// let { colorScheme } = props;
// colorScheme = getColorScheme(
// props,
// colorScheme !== 'primary' ? colorScheme : status
// );
// const lightBg =
// variant === 'solid'
// ? getColor(theme, `${colorScheme}.400`, colorScheme)
// : getColor(theme, `${colorScheme}.100`, colorScheme);
// const darkBg =
// variant === 'solid'
// ? getColor(theme, `${colorScheme}.700`, colorScheme)
// : getColor(theme, `${colorScheme}.400`, colorScheme);
// return mode(lightBg, darkBg)(props);
// }
function variantSubtle(props: Dict) {
const { colorScheme: c } = props;
let bg = `${c}.100`;
bg = mode(bg, `${c}.200`)(props);
let color;
if (props.isDisabled) {
bg = mode(`muted.300`, `muted.500`)(props);
} else {
color = mode(`${c}.500`, `${c}.600`)(props);
}
const styleObject = {
</s> add function variantSubtle({ colorScheme }: Dict) {
return { </s> remove const spinnerElement = spinner ? (
spinner
) : (
<Spinner color={_text?.color} {..._spinner} />
);
</s> add const spinnerElement = spinner ? spinner : <Spinner {..._spinner} />; </s> remove import { Dict, mode, transparentize } from './../tools';
import { Platform } from 'react-native';
const disabledTextColor = (props: any) => mode(`muted.500`, `muted.300`)(props);
</s> add import { Dict, mode } from './../tools'; </s> remove function variantSolid(props: Dict) {
const { colorScheme: c } = props;
let bg = `${c}.500`;
if (props.isDisabled) {
bg = mode(`muted.300`, `muted.500`)(props);
}
const styleObject = {
_web: {
outlineWidth: '0',
</s> add function variantSolid({ colorScheme }: Dict) {
return {
_text: {
color: 'text.50', </s> remove import { mode } from '../tools';
</s> add | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/components/primitives/Button/Button.tsx |
..._icon, | <mask> endIcon,
<mask> (child: JSX.Element, index: number) => {
<mask> return React.cloneElement(child, {
<mask> key: `button-end-icon-${index}`,
<mask> ..._text,
<mask> ...child.props,
<mask> });
<mask> }
<mask> );
<mask> }
</s> feat: _icon internal prop and design changes for button and divider </s> remove ..._text,
</s> add ..._icon, </s> remove import { Dict, mode, transparentize } from './../tools';
import { Platform } from 'react-native';
const disabledTextColor = (props: any) => mode(`muted.500`, `muted.300`)(props);
</s> add import { Dict, mode } from './../tools'; </s> remove import { Button, Box, VStack } from 'native-base';
</s> add import { Button, VStack, HStack, AddIcon } from 'native-base'; </s> remove const focusRing =
Platform.OS === 'web'
? mode(
{ boxShadow: `${primary[400]} 0px 0px 0px 2px`, zIndex: 1 },
{ boxShadow: `${primary[500]} 0px 0px 0px 2px`, zIndex: 1 }
)(props)
: {};
</s> add const focusRing = mode(
{
boxShadow: `${primary[400]} 0px 0px 0px 2px`,
},
{
boxShadow: `${primary[500]} 0px 0px 0px 2px`,
}
)(props); </s> remove // function getBg(props: Record<string, any>) {
// const { theme, status, variant } = props;
// let { colorScheme } = props;
// colorScheme = getColorScheme(
// props,
// colorScheme !== 'primary' ? colorScheme : status
// );
// const lightBg =
// variant === 'solid'
// ? getColor(theme, `${colorScheme}.400`, colorScheme)
// : getColor(theme, `${colorScheme}.100`, colorScheme);
// const darkBg =
// variant === 'solid'
// ? getColor(theme, `${colorScheme}.700`, colorScheme)
// : getColor(theme, `${colorScheme}.400`, colorScheme);
// return mode(lightBg, darkBg)(props);
// }
function variantSubtle(props: Dict) {
const { colorScheme: c } = props;
let bg = `${c}.100`;
bg = mode(bg, `${c}.200`)(props);
let color;
if (props.isDisabled) {
bg = mode(`muted.300`, `muted.500`)(props);
} else {
color = mode(`${c}.500`, `${c}.600`)(props);
}
const styleObject = {
</s> add function variantSubtle({ colorScheme }: Dict) {
return { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/components/primitives/Button/Button.tsx |
..._icon, | <mask> startIcon,
<mask> (child: JSX.Element, index: number) => {
<mask> return React.cloneElement(child, {
<mask> key: `button-start-icon-${index}`,
<mask> ..._text,
<mask> ...child.props,
<mask> });
<mask> }
<mask> );
<mask> }
</s> feat: _icon internal prop and design changes for button and divider </s> remove ..._text,
</s> add ..._icon, </s> remove import { Dict, mode, transparentize } from './../tools';
import { Platform } from 'react-native';
const disabledTextColor = (props: any) => mode(`muted.500`, `muted.300`)(props);
</s> add import { Dict, mode } from './../tools'; </s> remove import { Button, Box, VStack } from 'native-base';
</s> add import { Button, VStack, HStack, AddIcon } from 'native-base'; </s> remove const focusRing =
Platform.OS === 'web'
? mode(
{ boxShadow: `${primary[400]} 0px 0px 0px 2px`, zIndex: 1 },
{ boxShadow: `${primary[500]} 0px 0px 0px 2px`, zIndex: 1 }
)(props)
: {};
</s> add const focusRing = mode(
{
boxShadow: `${primary[400]} 0px 0px 0px 2px`,
},
{
boxShadow: `${primary[500]} 0px 0px 0px 2px`,
}
)(props); </s> remove // function getBg(props: Record<string, any>) {
// const { theme, status, variant } = props;
// let { colorScheme } = props;
// colorScheme = getColorScheme(
// props,
// colorScheme !== 'primary' ? colorScheme : status
// );
// const lightBg =
// variant === 'solid'
// ? getColor(theme, `${colorScheme}.400`, colorScheme)
// : getColor(theme, `${colorScheme}.100`, colorScheme);
// const darkBg =
// variant === 'solid'
// ? getColor(theme, `${colorScheme}.700`, colorScheme)
// : getColor(theme, `${colorScheme}.400`, colorScheme);
// return mode(lightBg, darkBg)(props);
// }
function variantSubtle(props: Dict) {
const { colorScheme: c } = props;
let bg = `${c}.100`;
bg = mode(bg, `${c}.200`)(props);
let color;
if (props.isDisabled) {
bg = mode(`muted.300`, `muted.500`)(props);
} else {
color = mode(`${c}.500`, `${c}.600`)(props);
}
const styleObject = {
</s> add function variantSubtle({ colorScheme }: Dict) {
return { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/components/primitives/Button/Button.tsx |
const spinnerElement = spinner ? spinner : <Spinner {..._spinner} />; | <mask> }
<mask>
<mask> const boxChildren = isLoading && isLoadingText ? isLoadingText : children;
<mask>
<mask> const spinnerElement = spinner ? (
<mask> spinner
<mask> ) : (
<mask> <Spinner color={_text?.color} {..._spinner} />
<mask> );
<mask>
<mask> return (
<mask> <Pressable
<mask> disabled={isDisabled || isLoading}
<mask> ref={ref}
</s> feat: _icon internal prop and design changes for button and divider </s> remove import { Button, Box, VStack } from 'native-base';
</s> add import { Button, VStack, HStack, AddIcon } from 'native-base'; </s> remove <Box>
{/* @ts-ignore */}
<Button key={size} size={size}>
</s> add <HStack space="4">
<Button size={size}>BUTTON</Button>
<Button size={size} leftIcon={<AddIcon />}> </s> remove // function getBg(props: Record<string, any>) {
// const { theme, status, variant } = props;
// let { colorScheme } = props;
// colorScheme = getColorScheme(
// props,
// colorScheme !== 'primary' ? colorScheme : status
// );
// const lightBg =
// variant === 'solid'
// ? getColor(theme, `${colorScheme}.400`, colorScheme)
// : getColor(theme, `${colorScheme}.100`, colorScheme);
// const darkBg =
// variant === 'solid'
// ? getColor(theme, `${colorScheme}.700`, colorScheme)
// : getColor(theme, `${colorScheme}.400`, colorScheme);
// return mode(lightBg, darkBg)(props);
// }
function variantSubtle(props: Dict) {
const { colorScheme: c } = props;
let bg = `${c}.100`;
bg = mode(bg, `${c}.200`)(props);
let color;
if (props.isDisabled) {
bg = mode(`muted.300`, `muted.500`)(props);
} else {
color = mode(`${c}.500`, `${c}.600`)(props);
}
const styleObject = {
</s> add function variantSubtle({ colorScheme }: Dict) {
return { </s> remove _text: {
fontWeight: 'medium',
},
</s> add </s> remove ...variantGhost(props),
_text: {
textDecorationLine: Platform.select({
ios: 'underline',
web: 'underline',
}),
color:
c === 'muted'
? mode(`muted.800`, `${c}.200`)(props)
: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.500`, `${c}.300`)(props),
</s> add _icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40', | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/components/primitives/Button/Button.tsx |
import type { IIconProps } from '../Icon'; | <mask> import type { MutableRefObject } from 'react';
<mask> import type { ISizes } from '../../../theme/base/sizes';
<mask> import type { VariantType } from '../../../components/types/utils';
<mask> import type { ISpinnerProps } from '../Spinner/types';
<mask>
<mask> // Todo: Create underscore Props section on docs.
<mask> // _hover?: IButtonProps;
<mask> export interface IButtonProps extends IPressableProps<IButtonProps> {
<mask> /**
</s> feat: _icon internal prop and design changes for button and divider </s> remove import { Button, Box, VStack } from 'native-base';
</s> add import { Button, VStack, HStack, AddIcon } from 'native-base'; </s> remove import { Dict, mode, transparentize } from './../tools';
import { Platform } from 'react-native';
const disabledTextColor = (props: any) => mode(`muted.500`, `muted.300`)(props);
</s> add import { Dict, mode } from './../tools'; </s> remove import { mode } from '../tools';
</s> add </s> remove // function getBg(props: Record<string, any>) {
// const { theme, status, variant } = props;
// let { colorScheme } = props;
// colorScheme = getColorScheme(
// props,
// colorScheme !== 'primary' ? colorScheme : status
// );
// const lightBg =
// variant === 'solid'
// ? getColor(theme, `${colorScheme}.400`, colorScheme)
// : getColor(theme, `${colorScheme}.100`, colorScheme);
// const darkBg =
// variant === 'solid'
// ? getColor(theme, `${colorScheme}.700`, colorScheme)
// : getColor(theme, `${colorScheme}.400`, colorScheme);
// return mode(lightBg, darkBg)(props);
// }
function variantSubtle(props: Dict) {
const { colorScheme: c } = props;
let bg = `${c}.100`;
bg = mode(bg, `${c}.200`)(props);
let color;
if (props.isDisabled) {
bg = mode(`muted.300`, `muted.500`)(props);
} else {
color = mode(`${c}.500`, `${c}.600`)(props);
}
const styleObject = {
</s> add function variantSubtle({ colorScheme }: Dict) {
return { </s> remove
return styleObject;
</s> add | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/components/primitives/Button/types.ts |
/**
* Props to be passed to the Icon used inside of Button.
*/
_icon?: IIconProps; | <mask> * Props to be passed to the HStack used inside of Button.
<mask> */
<mask> _stack?: IStackProps;
<mask> /**
<mask> * Prop to decide placement of spinner.
<mask> */
<mask> spinnerPlacement?: 'start' | 'end';
<mask> /**
</s> feat: _icon internal prop and design changes for button and divider </s> remove bg: mode('coolGray.200', 'gray.600')(props),
</s> add _light: {
bg: 'muted.300',
},
_dark: {
bg: 'muted.600',
}, </s> remove style: props.variant !== 'unstyled' ? { ...focusRing } : {},
</s> add _web: {
outlineWidth: '0',
style: { ...focusRing },
}, </s> remove borderWidth: '1',
borderColor:
c === 'muted'
? borderColor
: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.300`, `${c}.300`)(props),
...variantGhost(props),
</s> add borderWidth: '1px',
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40',
},
_light: {
borderColor: 'muted.300',
_text: {
color: `${colorScheme}.600`,
},
_icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_hover: {
bg: `${colorScheme}.600:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.600:alpha.20`,
},
},
_dark: {
borderColor: 'muted.700',
_text: {
color: `${colorScheme}.500`,
},
_icon: {
color: `${colorScheme}.500`,
},
_spinner: {
color: `${colorScheme}.500`,
},
_hover: {
bg: `${colorScheme}.500:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.500:alpha.20`,
},
}, </s> remove function variantOutline(props: Dict) {
const { colorScheme: c } = props;
const borderColor = mode(`muted.200`, `muted.500`)(props);
</s> add function variantOutline({ colorScheme }: Dict) { | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/components/primitives/Button/types.ts |
import { Dict, mode } from './../tools'; | <mask> import { Dict, mode, transparentize } from './../tools';
<mask> import { Platform } from 'react-native';
<mask> const disabledTextColor = (props: any) => mode(`muted.500`, `muted.300`)(props);
<mask>
<mask> const baseStyle = (props: any) => {
<mask> const { primary } = props.theme.colors;
<mask> const focusRing =
<mask> Platform.OS === 'web'
</s> feat: _icon internal prop and design changes for button and divider </s> remove const focusRing =
Platform.OS === 'web'
? mode(
{ boxShadow: `${primary[400]} 0px 0px 0px 2px`, zIndex: 1 },
{ boxShadow: `${primary[500]} 0px 0px 0px 2px`, zIndex: 1 }
)(props)
: {};
</s> add const focusRing = mode(
{
boxShadow: `${primary[400]} 0px 0px 0px 2px`,
},
{
boxShadow: `${primary[500]} 0px 0px 0px 2px`,
}
)(props); </s> remove import { Button, Box, VStack } from 'native-base';
</s> add import { Button, VStack, HStack, AddIcon } from 'native-base'; </s> remove import { mode } from '../tools';
</s> add </s> remove function variantOutline(props: Dict) {
const { colorScheme: c } = props;
const borderColor = mode(`muted.200`, `muted.500`)(props);
</s> add function variantOutline({ colorScheme }: Dict) { | [
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
const focusRing = mode(
{
boxShadow: `${primary[400]} 0px 0px 0px 2px`,
},
{
boxShadow: `${primary[500]} 0px 0px 0px 2px`,
}
)(props); | <mask> const disabledTextColor = (props: any) => mode(`muted.500`, `muted.300`)(props);
<mask>
<mask> const baseStyle = (props: any) => {
<mask> const { primary } = props.theme.colors;
<mask> const focusRing =
<mask> Platform.OS === 'web'
<mask> ? mode(
<mask> { boxShadow: `${primary[400]} 0px 0px 0px 2px`, zIndex: 1 },
<mask> { boxShadow: `${primary[500]} 0px 0px 0px 2px`, zIndex: 1 }
<mask> )(props)
<mask> : {};
<mask>
<mask> return {
<mask> borderRadius: 'sm',
<mask> flexDirection: 'row',
<mask> justifyContent: 'center',
</s> feat: _icon internal prop and design changes for button and divider </s> remove import { Dict, mode, transparentize } from './../tools';
import { Platform } from 'react-native';
const disabledTextColor = (props: any) => mode(`muted.500`, `muted.300`)(props);
</s> add import { Dict, mode } from './../tools'; </s> remove borderRadius: 'sm',
</s> add borderRadius: 'sm', // '4px' </s> remove import { Button, Box, VStack } from 'native-base';
</s> add import { Button, VStack, HStack, AddIcon } from 'native-base'; </s> remove // function getBg(props: Record<string, any>) {
// const { theme, status, variant } = props;
// let { colorScheme } = props;
// colorScheme = getColorScheme(
// props,
// colorScheme !== 'primary' ? colorScheme : status
// );
// const lightBg =
// variant === 'solid'
// ? getColor(theme, `${colorScheme}.400`, colorScheme)
// : getColor(theme, `${colorScheme}.100`, colorScheme);
// const darkBg =
// variant === 'solid'
// ? getColor(theme, `${colorScheme}.700`, colorScheme)
// : getColor(theme, `${colorScheme}.400`, colorScheme);
// return mode(lightBg, darkBg)(props);
// }
function variantSubtle(props: Dict) {
const { colorScheme: c } = props;
let bg = `${c}.100`;
bg = mode(bg, `${c}.200`)(props);
let color;
if (props.isDisabled) {
bg = mode(`muted.300`, `muted.500`)(props);
} else {
color = mode(`${c}.500`, `${c}.600`)(props);
}
const styleObject = {
</s> add function variantSubtle({ colorScheme }: Dict) {
return { </s> remove import { mode } from '../tools';
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
borderRadius: 'sm', // '4px' | <mask> )(props)
<mask> : {};
<mask>
<mask> return {
<mask> borderRadius: 'sm',
<mask> flexDirection: 'row',
<mask> justifyContent: 'center',
<mask> alignItems: 'center',
<mask> _web: {
<mask> cursor: props.isDisabled
</s> feat: _icon internal prop and design changes for button and divider </s> remove const focusRing =
Platform.OS === 'web'
? mode(
{ boxShadow: `${primary[400]} 0px 0px 0px 2px`, zIndex: 1 },
{ boxShadow: `${primary[500]} 0px 0px 0px 2px`, zIndex: 1 }
)(props)
: {};
</s> add const focusRing = mode(
{
boxShadow: `${primary[400]} 0px 0px 0px 2px`,
},
{
boxShadow: `${primary[500]} 0px 0px 0px 2px`,
}
)(props); </s> remove style: props.variant !== 'unstyled' ? { ...focusRing } : {},
</s> add _web: {
outlineWidth: '0',
style: { ...focusRing },
}, </s> remove space: 2,
</s> add space: '1.5', </s> remove _loading: {
opacity: '80',
},
_disabled: {
opacity: '50',
},
</s> add // _loading: {
// opacity: '80',
// },
// _disabled: {
// opacity: '50',
// }, </s> remove _text: {
color: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.500`, `${c}.300`)(props),
},
bg: 'transparent',
_web: {
outlineWidth: '0',
},
_hover: {
borderColor: mode(`${c}.500`, `${c}.200`)(props),
bg: transparentize(mode(`${c}.200`, `${c}.400`)(props), 0.5)(props.theme),
</s> add _disabled: {
opacity: '40', | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
<mask> : props.isLoading
<mask> ? 'default'
<mask> : 'pointer',
<mask> },
<mask> _text: {
<mask> fontWeight: 'medium',
<mask> },
<mask> _focusVisible: {
<mask> style: props.variant !== 'unstyled' ? { ...focusRing } : {},
<mask> },
<mask> _stack: {
<mask> space: 2,
</s> feat: _icon internal prop and design changes for button and divider </s> remove style: props.variant !== 'unstyled' ? { ...focusRing } : {},
</s> add _web: {
outlineWidth: '0',
style: { ...focusRing },
}, </s> remove space: 2,
</s> add space: '1.5', </s> remove _loading: {
opacity: '80',
},
_disabled: {
opacity: '50',
},
</s> add // _loading: {
// opacity: '80',
// },
// _disabled: {
// opacity: '50',
// }, </s> remove _text: {
color: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.500`, `${c}.300`)(props),
},
bg: 'transparent',
_web: {
outlineWidth: '0',
},
_hover: {
borderColor: mode(`${c}.500`, `${c}.200`)(props),
bg: transparentize(mode(`${c}.200`, `${c}.400`)(props), 0.5)(props.theme),
</s> add _disabled: {
opacity: '40', </s> remove ...variantGhost(props),
_text: {
textDecorationLine: Platform.select({
ios: 'underline',
web: 'underline',
}),
color:
c === 'muted'
? mode(`muted.800`, `${c}.200`)(props)
: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.500`, `${c}.300`)(props),
</s> add _icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40', | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts | |
_web: {
outlineWidth: '0',
style: { ...focusRing },
}, | <mask> _text: {
<mask> fontWeight: 'medium',
<mask> },
<mask> _focusVisible: {
<mask> style: props.variant !== 'unstyled' ? { ...focusRing } : {},
<mask> },
<mask> _stack: {
<mask> space: 2,
<mask> alignItems: 'center',
<mask> },
</s> feat: _icon internal prop and design changes for button and divider </s> remove _text: {
fontWeight: 'medium',
},
</s> add </s> remove space: 2,
</s> add space: '1.5', </s> remove _loading: {
opacity: '80',
},
_disabled: {
opacity: '50',
},
</s> add // _loading: {
// opacity: '80',
// },
// _disabled: {
// opacity: '50',
// }, </s> remove _text: {
color: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.500`, `${c}.300`)(props),
},
bg: 'transparent',
_web: {
outlineWidth: '0',
},
_hover: {
borderColor: mode(`${c}.500`, `${c}.200`)(props),
bg: transparentize(mode(`${c}.200`, `${c}.400`)(props), 0.5)(props.theme),
</s> add _disabled: {
opacity: '40', </s> remove color: mode(`${c}.600`, `${c}.400`)(props),
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
space: '1.5', | <mask> _focusVisible: {
<mask> style: props.variant !== 'unstyled' ? { ...focusRing } : {},
<mask> },
<mask> _stack: {
<mask> space: 2,
<mask> alignItems: 'center',
<mask> },
<mask> _loading: {
<mask> opacity: '80',
<mask> },
</s> feat: _icon internal prop and design changes for button and divider </s> remove style: props.variant !== 'unstyled' ? { ...focusRing } : {},
</s> add _web: {
outlineWidth: '0',
style: { ...focusRing },
}, </s> remove _text: {
fontWeight: 'medium',
},
</s> add </s> remove _loading: {
opacity: '80',
},
_disabled: {
opacity: '50',
},
</s> add // _loading: {
// opacity: '80',
// },
// _disabled: {
// opacity: '50',
// }, </s> remove ...variantGhost(props),
_text: {
textDecorationLine: Platform.select({
ios: 'underline',
web: 'underline',
}),
color:
c === 'muted'
? mode(`muted.800`, `${c}.200`)(props)
: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.500`, `${c}.300`)(props),
</s> add _icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40', </s> remove borderWidth: '1',
borderColor:
c === 'muted'
? borderColor
: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.300`, `${c}.300`)(props),
...variantGhost(props),
</s> add borderWidth: '1px',
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40',
},
_light: {
borderColor: 'muted.300',
_text: {
color: `${colorScheme}.600`,
},
_icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_hover: {
bg: `${colorScheme}.600:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.600:alpha.20`,
},
},
_dark: {
borderColor: 'muted.700',
_text: {
color: `${colorScheme}.500`,
},
_icon: {
color: `${colorScheme}.500`,
},
_spinner: {
color: `${colorScheme}.500`,
},
_hover: {
bg: `${colorScheme}.500:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.500:alpha.20`,
},
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
// _loading: {
// opacity: '80',
// },
// _disabled: {
// opacity: '50',
// }, | <mask> _stack: {
<mask> space: 2,
<mask> alignItems: 'center',
<mask> },
<mask> _loading: {
<mask> opacity: '80',
<mask> },
<mask> _disabled: {
<mask> opacity: '50',
<mask> },
<mask> _spinner: {
<mask> size: 'sm',
<mask> focusable: false,
<mask> },
<mask> };
</s> feat: _icon internal prop and design changes for button and divider </s> remove space: 2,
</s> add space: '1.5', </s> remove style: props.variant !== 'unstyled' ? { ...focusRing } : {},
</s> add _web: {
outlineWidth: '0',
style: { ...focusRing },
}, </s> remove _focus: {
bg: `${c}.600`,
</s> add _disabled: {
opacity: '40', </s> remove _disabled: { bg: mode(`trueGray.300`, `trueGray.600`)(props) },
</s> add </s> remove bg: mode(`warmGray.50`, `${c}.300`)(props),
opacity: '50',
</s> add opacity: '40',
},
_light: {
bg: `${colorScheme}.600`,
_hover: {
bg: `${colorScheme}.700`,
},
_pressed: {
bg: `${colorScheme}.800`,
},
},
_dark: {
bg: `${colorScheme}.600`,
_hover: {
bg: `${colorScheme}.700`,
},
_pressed: {
bg: `${colorScheme}.800`,
}, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
function variantGhost({ colorScheme }: Dict) { | <mask> },
<mask> };
<mask> };
<mask>
<mask> function variantGhost(props: Dict) {
<mask> const { colorScheme: c } = props;
<mask> if (c === 'muted') {
<mask> return {
<mask> _text: {
<mask> color: disabledTextColor(props),
<mask> },
<mask> };
<mask> }
<mask>
<mask> return {
<mask> _text: {
<mask> color: props.isDisabled
<mask> ? disabledTextColor(props)
<mask> : mode(`${c}.500`, `${c}.300`)(props),
</s> feat: _icon internal prop and design changes for button and divider </s> remove ...variantGhost(props),
_text: {
textDecorationLine: Platform.select({
ios: 'underline',
web: 'underline',
}),
color:
c === 'muted'
? mode(`muted.800`, `${c}.200`)(props)
: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.500`, `${c}.300`)(props),
</s> add _icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40', </s> remove borderWidth: '1',
borderColor:
c === 'muted'
? borderColor
: props.isDisabled
? disabledTextColor(props)
: mode(`${c}.300`, `${c}.300`)(props),
...variantGhost(props),
</s> add borderWidth: '1px',
_disabled: {
opacity: '40',
},
_loading: {
opacity: '40',
},
_light: {
borderColor: 'muted.300',
_text: {
color: `${colorScheme}.600`,
},
_icon: {
color: `${colorScheme}.600`,
},
_spinner: {
color: `${colorScheme}.600`,
},
_hover: {
bg: `${colorScheme}.600:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.600:alpha.20`,
},
},
_dark: {
borderColor: 'muted.700',
_text: {
color: `${colorScheme}.500`,
},
_icon: {
color: `${colorScheme}.500`,
},
_spinner: {
color: `${colorScheme}.500`,
},
_hover: {
bg: `${colorScheme}.500:alpha.10`,
},
_pressed: {
bg: `${colorScheme}.500:alpha.20`,
},
}, </s> remove function variantOutline(props: Dict) {
const { colorScheme: c } = props;
const borderColor = mode(`muted.200`, `muted.500`)(props);
</s> add function variantOutline({ colorScheme }: Dict) { </s> remove function variantSolid(props: Dict) {
const { colorScheme: c } = props;
let bg = `${c}.500`;
if (props.isDisabled) {
bg = mode(`muted.300`, `muted.500`)(props);
}
const styleObject = {
_web: {
outlineWidth: '0',
</s> add function variantSolid({ colorScheme }: Dict) {
return {
_text: {
color: 'text.50', </s> remove
return styleObject;
</s> add | [
"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/12353876a8deeb3b0465277927e664c87872c802 | src/theme/components/button.ts |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.