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 |
|---|---|---|---|---|
<mask> const a: AllProps<StyledProps> = {
<mask> flexDir: 'column',
<mask> };
<mask>
<mask> console.log('hhf ', a);
<mask>
<mask> // type SpaceProps = {
<mask> // [key in keyof typeof space]?: SpaceType;
<mask> // };
<mask>
<mask> // type LayoutProps = {
</s> fix: generate type from styled system </s> remove type PropConfig = { [key: string]: PropRule };
</s> add </s> remove : 'property' extends keyof T[key]
? GetRNStyles<T[key]['property']>
: 'properties' extends keyof T[key]
? T[key]['properties'] extends { '0': string }
? GetRNStyles<T[key]['properties']['0']>
</s> add : T[key] extends PropRule
? 'shadow' extends key
? GetRNStyles<key, T[key]['scale']>
: 'property' extends keyof T[key]
? GetRNStyles<T[key]['property'], T[key]['scale']>
: 'properties' extends keyof T[key]
? T[key]['properties'] extends { '0': string }
? //@ts-ignore
GetRNStyles<T[key]['properties']['0'], T[key]['scale']>
: unknown </s> remove : any;
</s> add : key extends keyof CSSProperties
? ResponsiveValue<CSSProperties[key]>
: unknown; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/399b9c1a5e30a61446aa461baec356bfde07f512 | src/theme/types.ts | |
it('should convert px to absolute on native', () => { | <mask> import theme from '../base';
<mask> import { platformSpecificSpaceUnits } from './utils';
<mask>
<mask> describe('platform units on native', () => {
<mask> it('converts px to absolute on native', () => {
<mask> Platform.OS = 'ios';
<mask> const newTheme = { ...theme };
<mask> newTheme.space = { xs: '1px' };
<mask> const convertedTheme = platformSpecificSpaceUnits(newTheme);
<mask> expect(convertedTheme.space).toEqual({ xs: 1 });
</s> fix: platform unit test cases </s> remove it('converts rem to absolute on native', () => {
</s> add it('should convert rem to absolute on native', () => { </s> remove it('converts absolute to rem on web', () => {
</s> add it('should not convert px to rem on web', () => {
Platform.OS = 'web';
const newTheme = { ...theme };
newTheme.space = { xs: '23px' };
const convertedTheme = platformSpecificSpaceUnits(newTheme);
expect(convertedTheme.space).toEqual({ xs: '23px' });
});
it('should convert absolute to rem on web', () => { </s> remove // If platform is web, we need to convert px unit to rem and absolute unit to rem. e.g. 16px to 1rem and 16 to 1rem.
</s> add // If platform is web, we need to convert absolute unit to rem. e.g. 16 to 1rem </s> remove if (isPx) {
newScale[scaleKey] = convertAbsoluteToRem(parseFloat(val));
} else if (isAbsolute) {
</s> add if (isAbsolute) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/39a523f71d0793792f24329d55006d22ecf45419 | src/theme/tools/platformUnits.test.js |
it('should convert rem to absolute on native', () => { | <mask> const convertedTheme = platformSpecificSpaceUnits(newTheme);
<mask> expect(convertedTheme.space).toEqual({ xs: 1 });
<mask> });
<mask>
<mask> it('converts rem to absolute on native', () => {
<mask> Platform.OS = 'ios';
<mask> const newTheme = { ...theme };
<mask> newTheme.space = { xs: '2rem' };
<mask> const convertedTheme = platformSpecificSpaceUnits(newTheme);
<mask> expect(convertedTheme.space).toEqual({ xs: 32 });
</s> fix: platform unit test cases </s> remove it('converts px to absolute on native', () => {
</s> add it('should convert px to absolute on native', () => { </s> remove it('converts absolute to rem on web', () => {
</s> add it('should not convert px to rem on web', () => {
Platform.OS = 'web';
const newTheme = { ...theme };
newTheme.space = { xs: '23px' };
const convertedTheme = platformSpecificSpaceUnits(newTheme);
expect(convertedTheme.space).toEqual({ xs: '23px' });
});
it('should convert absolute to rem on web', () => { </s> remove // If platform is web, we need to convert px unit to rem and absolute unit to rem. e.g. 16px to 1rem and 16 to 1rem.
</s> add // If platform is web, we need to convert absolute unit to rem. e.g. 16 to 1rem </s> remove if (isPx) {
newScale[scaleKey] = convertAbsoluteToRem(parseFloat(val));
} else if (isAbsolute) {
</s> add if (isAbsolute) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/39a523f71d0793792f24329d55006d22ecf45419 | src/theme/tools/platformUnits.test.js |
it('should not convert px to rem on web', () => {
Platform.OS = 'web';
const newTheme = { ...theme };
newTheme.space = { xs: '23px' };
const convertedTheme = platformSpecificSpaceUnits(newTheme);
expect(convertedTheme.space).toEqual({ xs: '23px' });
});
it('should convert absolute to rem on web', () => { | <mask> });
<mask> });
<mask>
<mask> describe('platform units on web', () => {
<mask> it('converts absolute to rem on web', () => {
<mask> Platform.OS = 'web';
<mask> const newTheme = { ...theme };
<mask> newTheme.space = { xs: 23 };
<mask> const convertedTheme = platformSpecificSpaceUnits(newTheme);
<mask> expect(convertedTheme.space).toEqual({ xs: '1.4375rem' });
</s> fix: platform unit test cases </s> remove it('converts px to absolute on native', () => {
</s> add it('should convert px to absolute on native', () => { </s> remove it('converts rem to absolute on native', () => {
</s> add it('should convert rem to absolute on native', () => { </s> remove // If platform is web, we need to convert px unit to rem and absolute unit to rem. e.g. 16px to 1rem and 16 to 1rem.
</s> add // If platform is web, we need to convert absolute unit to rem. e.g. 16 to 1rem </s> remove if (isPx) {
newScale[scaleKey] = convertAbsoluteToRem(parseFloat(val));
} else if (isAbsolute) {
</s> add if (isAbsolute) { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/39a523f71d0793792f24329d55006d22ecf45419 | src/theme/tools/platformUnits.test.js |
// If platform is web, we need to convert absolute unit to rem. e.g. 16 to 1rem | <mask> const isAbsolute = typeof val === 'number';
<mask> const isPx = !isAbsolute && val.endsWith('px');
<mask> const isRem = !isAbsolute && val.endsWith('rem');
<mask>
<mask> // If platform is web, we need to convert px unit to rem and absolute unit to rem. e.g. 16px to 1rem and 16 to 1rem.
<mask> if (isWeb) {
<mask> if (isPx) {
<mask> newScale[scaleKey] = convertAbsoluteToRem(parseFloat(val));
<mask> } else if (isAbsolute) {
<mask> newScale[scaleKey] = convertAbsoluteToRem(val);
</s> fix: platform unit test cases </s> remove if (isPx) {
newScale[scaleKey] = convertAbsoluteToRem(parseFloat(val));
} else if (isAbsolute) {
</s> add if (isAbsolute) { </s> remove it('converts absolute to rem on web', () => {
</s> add it('should not convert px to rem on web', () => {
Platform.OS = 'web';
const newTheme = { ...theme };
newTheme.space = { xs: '23px' };
const convertedTheme = platformSpecificSpaceUnits(newTheme);
expect(convertedTheme.space).toEqual({ xs: '23px' });
});
it('should convert absolute to rem on web', () => { </s> remove it('converts rem to absolute on native', () => {
</s> add it('should convert rem to absolute on native', () => { </s> remove it('converts px to absolute on native', () => {
</s> add it('should convert px to absolute on native', () => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/39a523f71d0793792f24329d55006d22ecf45419 | src/theme/tools/utils.ts |
if (isAbsolute) { | <mask> const isRem = !isAbsolute && val.endsWith('rem');
<mask>
<mask> // If platform is web, we need to convert px unit to rem and absolute unit to rem. e.g. 16px to 1rem and 16 to 1rem.
<mask> if (isWeb) {
<mask> if (isPx) {
<mask> newScale[scaleKey] = convertAbsoluteToRem(parseFloat(val));
<mask> } else if (isAbsolute) {
<mask> newScale[scaleKey] = convertAbsoluteToRem(val);
<mask> }
<mask> }
<mask> // If platform is not web, we need to convert px unit to absolute and rem unit to absolute. e.g. 16px to 16. 1rem to 16.
<mask> else {
</s> fix: platform unit test cases </s> remove // If platform is web, we need to convert px unit to rem and absolute unit to rem. e.g. 16px to 1rem and 16 to 1rem.
</s> add // If platform is web, we need to convert absolute unit to rem. e.g. 16 to 1rem </s> remove it('converts absolute to rem on web', () => {
</s> add it('should not convert px to rem on web', () => {
Platform.OS = 'web';
const newTheme = { ...theme };
newTheme.space = { xs: '23px' };
const convertedTheme = platformSpecificSpaceUnits(newTheme);
expect(convertedTheme.space).toEqual({ xs: '23px' });
});
it('should convert absolute to rem on web', () => { </s> remove it('converts px to absolute on native', () => {
</s> add it('should convert px to absolute on native', () => { </s> remove it('converts rem to absolute on native', () => {
</s> add it('should convert rem to absolute on native', () => { | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/39a523f71d0793792f24329d55006d22ecf45419 | src/theme/tools/utils.ts |
} = usePropsResolution(
'Checkbox',
{ ...combinedProps, ...inputProps },
{
isInvalid,
isReadOnly,
isIndeterminate,
isDisabled,
isChecked,
isHovered,
isPressed,
isFocused,
}
); | <mask> onHoverOut,
<mask> onFocus,
<mask> onBlur,
<mask> ...resolvedProps
<mask> } = usePropsResolution('Checkbox', inputProps, {
<mask> isInvalid,
<mask> isReadOnly,
<mask> isIndeterminate,
<mask> isDisabled,
<mask> isChecked,
<mask> isHovered,
<mask> isPressed,
<mask> isFocused,
<mask> });
<mask>
<mask> const [layoutProps, nonLayoutProps] = extractInObject(resolvedProps, [
<mask> ...stylingProps.margin,
<mask> ...stylingProps.layout,
<mask> ...stylingProps.flexbox,
</s> feat: added new pseudo prop for RadioGroup and CheckboxGroup </s> remove { size, colorScheme, ...props }: IRadioGroupProps,
</s> add { size, colorScheme, _radio, ...props }: IRadioGroupProps, </s> remove { size, colorScheme, ...props }: ICheckboxGroupProps,
</s> add { size, _checkbox, colorScheme, ...props }: ICheckboxGroupProps, </s> remove const combinedProps = combineContextAndProps(formControlContext, props);
</s> add const combinedProps = combineContextAndProps(
{ ...formControlContext, ...contextState },
props
); </s> remove
const combinedProps = combineContextAndProps(formControlContext, props);
</s> add const combinedProps = combineContextAndProps(
{ ...formControlContext, ...contextState },
props
); | [
"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/3a3ac9edcd2fffc1c26da5ecc62615af0d2df284 | src/components/primitives/Checkbox/Checkbox.tsx |
{ size, _checkbox, colorScheme, ...props }: ICheckboxGroupProps, | <mask> null
<mask> );
<mask>
<mask> function CheckboxGroup(
<mask> { size, colorScheme, ...props }: ICheckboxGroupProps,
<mask> ref?: any
<mask> ) {
<mask> const { children } = props;
<mask> const state = useCheckboxGroupState(props);
<mask> const { groupProps } = useCheckboxGroup(
</s> feat: added new pseudo prop for RadioGroup and CheckboxGroup </s> remove { size, colorScheme, ...props }: IRadioGroupProps,
</s> add { size, colorScheme, _radio, ...props }: IRadioGroupProps, </s> remove const combinedProps = combineContextAndProps(formControlContext, props);
</s> add const combinedProps = combineContextAndProps(
{ ...formControlContext, ...contextState },
props
); </s> remove
const combinedProps = combineContextAndProps(formControlContext, props);
</s> add const combinedProps = combineContextAndProps(
{ ...formControlContext, ...contextState },
props
); </s> remove } = usePropsResolution('Checkbox', inputProps, {
isInvalid,
isReadOnly,
isIndeterminate,
isDisabled,
isChecked,
isHovered,
isPressed,
isFocused,
});
</s> add } = usePropsResolution(
'Checkbox',
{ ...combinedProps, ...inputProps },
{
isInvalid,
isReadOnly,
isIndeterminate,
isDisabled,
isChecked,
isHovered,
isPressed,
isFocused,
}
); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3a3ac9edcd2fffc1c26da5ecc62615af0d2df284 | src/components/primitives/Checkbox/CheckboxGroup.tsx |
..._checkbox, | <mask> value={{
<mask> size,
<mask> colorScheme,
<mask> ...formControlContext,
<mask> state,
<mask> }}
<mask> >
<mask> <Box alignItems="flex-start" {...groupProps} {...props} ref={ref}>
</s> feat: added new pseudo prop for RadioGroup and CheckboxGroup </s> remove }, [size, colorScheme, formControlContext, state]);
</s> add }, [size, colorScheme, formControlContext, state, _radio]); </s> remove const combinedProps = combineContextAndProps(formControlContext, props);
</s> add const combinedProps = combineContextAndProps(
{ ...formControlContext, ...contextState },
props
); </s> remove
const combinedProps = combineContextAndProps(formControlContext, props);
</s> add const combinedProps = combineContextAndProps(
{ ...formControlContext, ...contextState },
props
); | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3a3ac9edcd2fffc1c26da5ecc62615af0d2df284 | src/components/primitives/Checkbox/CheckboxGroup.tsx |
/**
* Pass props will be passed to each checkbox.
*/
_checkbox?: ICheckboxProps; | <mask> * The callback fired when any children Checkbox is checked or unchecked.
<mask> */
<mask> onChange?: (values: any) => any;
<mask> }
<mask> export interface ICheckboxContext extends IFormControlContext {
<mask> colorScheme?: string;
<mask> size?: ResponsiveValue<'sm' | 'md' | 'lg'>;
</s> feat: added new pseudo prop for RadioGroup and CheckboxGroup </s> remove { size, colorScheme, ...props }: ICheckboxGroupProps,
</s> add { size, _checkbox, colorScheme, ...props }: ICheckboxGroupProps, </s> remove } = usePropsResolution('Checkbox', inputProps, {
isInvalid,
isReadOnly,
isIndeterminate,
isDisabled,
isChecked,
isHovered,
isPressed,
isFocused,
});
</s> add } = usePropsResolution(
'Checkbox',
{ ...combinedProps, ...inputProps },
{
isInvalid,
isReadOnly,
isIndeterminate,
isDisabled,
isChecked,
isHovered,
isPressed,
isFocused,
}
); </s> remove { size, colorScheme, ...props }: IRadioGroupProps,
</s> add { size, colorScheme, _radio, ...props }: IRadioGroupProps, </s> remove const combinedProps = combineContextAndProps(formControlContext, props);
</s> add const combinedProps = combineContextAndProps(
{ ...formControlContext, ...contextState },
props
); | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3a3ac9edcd2fffc1c26da5ecc62615af0d2df284 | src/components/primitives/Checkbox/types.tsx |
const combinedProps = combineContextAndProps(
{ ...formControlContext, ...contextState },
props
); | <mask> ref: any
<mask> ) => {
<mask> const formControlContext = useFormControlContext();
<mask> const contextState = React.useContext(RadioContext);
<mask>
<mask> const combinedProps = combineContextAndProps(formControlContext, props);
<mask>
<mask> const inputRef = React.useRef(null);
<mask> const radioState = useRadio(
<mask> { ...combinedProps, 'aria-label': props.accessibilityLabel, children },
<mask> contextState.state ?? {},
<mask> inputRef
</s> feat: added new pseudo prop for RadioGroup and CheckboxGroup </s> remove const combinedProps = combineContextAndProps(formControlContext, props);
</s> add const combinedProps = combineContextAndProps(
{ ...formControlContext, ...contextState },
props
); </s> remove { size, colorScheme, ...props }: IRadioGroupProps,
</s> add { size, colorScheme, _radio, ...props }: IRadioGroupProps, </s> remove { size, colorScheme, ...props }: ICheckboxGroupProps,
</s> add { size, _checkbox, colorScheme, ...props }: ICheckboxGroupProps, </s> remove } = usePropsResolution('Checkbox', inputProps, {
isInvalid,
isReadOnly,
isIndeterminate,
isDisabled,
isChecked,
isHovered,
isPressed,
isFocused,
});
</s> add } = usePropsResolution(
'Checkbox',
{ ...combinedProps, ...inputProps },
{
isInvalid,
isReadOnly,
isIndeterminate,
isDisabled,
isChecked,
isHovered,
isPressed,
isFocused,
}
); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3a3ac9edcd2fffc1c26da5ecc62615af0d2df284 | src/components/primitives/Radio/Radio.tsx |
const combinedProps = combineContextAndProps(
{ ...formControlContext, ...contextState },
props
); | <mask> ) => {
<mask> const formControlContext = useFormControlContext();
<mask> const contextState = React.useContext(RadioContext);
<mask>
<mask> const combinedProps = combineContextAndProps(formControlContext, props);
<mask>
<mask> const inputRef = React.useRef(null);
<mask> const radioState = useRadio(
<mask> { ...combinedProps, 'aria-label': props.accessibilityLabel, children },
<mask> contextState.state ?? {},
</s> feat: added new pseudo prop for RadioGroup and CheckboxGroup </s> remove
const combinedProps = combineContextAndProps(formControlContext, props);
</s> add const combinedProps = combineContextAndProps(
{ ...formControlContext, ...contextState },
props
); </s> remove { size, colorScheme, ...props }: IRadioGroupProps,
</s> add { size, colorScheme, _radio, ...props }: IRadioGroupProps, </s> remove { size, colorScheme, ...props }: ICheckboxGroupProps,
</s> add { size, _checkbox, colorScheme, ...props }: ICheckboxGroupProps, </s> remove } = usePropsResolution('Checkbox', inputProps, {
isInvalid,
isReadOnly,
isIndeterminate,
isDisabled,
isChecked,
isHovered,
isPressed,
isFocused,
});
</s> add } = usePropsResolution(
'Checkbox',
{ ...combinedProps, ...inputProps },
{
isInvalid,
isReadOnly,
isIndeterminate,
isDisabled,
isChecked,
isHovered,
isPressed,
isFocused,
}
); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3a3ac9edcd2fffc1c26da5ecc62615af0d2df284 | src/components/primitives/Radio/Radio.web.tsx |
{ size, colorScheme, _radio, ...props }: IRadioGroupProps, | <mask> );
<mask> });
<mask>
<mask> const RadioGroup = (
<mask> { size, colorScheme, ...props }: IRadioGroupProps,
<mask> ref: any
<mask> ) => {
<mask> const formControlContext = useFormControlContext();
<mask>
<mask> const state = useRadioGroupState(props);
</s> feat: added new pseudo prop for RadioGroup and CheckboxGroup </s> remove { size, colorScheme, ...props }: ICheckboxGroupProps,
</s> add { size, _checkbox, colorScheme, ...props }: ICheckboxGroupProps, </s> remove
const combinedProps = combineContextAndProps(formControlContext, props);
</s> add const combinedProps = combineContextAndProps(
{ ...formControlContext, ...contextState },
props
); </s> remove const combinedProps = combineContextAndProps(formControlContext, props);
</s> add const combinedProps = combineContextAndProps(
{ ...formControlContext, ...contextState },
props
); </s> remove } = usePropsResolution('Checkbox', inputProps, {
isInvalid,
isReadOnly,
isIndeterminate,
isDisabled,
isChecked,
isHovered,
isPressed,
isFocused,
});
</s> add } = usePropsResolution(
'Checkbox',
{ ...combinedProps, ...inputProps },
{
isInvalid,
isReadOnly,
isIndeterminate,
isDisabled,
isChecked,
isHovered,
isPressed,
isFocused,
}
); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3a3ac9edcd2fffc1c26da5ecc62615af0d2df284 | src/components/primitives/Radio/RadioGroup.tsx |
..._radio, | <mask> size,
<mask> colorScheme,
<mask> state,
<mask> };
<mask> }, [size, colorScheme, formControlContext, state, _radio]);
<mask>
<mask> const radioGroupProps = React.useMemo(
<mask> () => radioGroupState.radioGroupProps,
</s> feat: added new pseudo prop for RadioGroup and CheckboxGroup </s> remove }, [size, colorScheme, formControlContext, state]);
</s> add }, [size, colorScheme, formControlContext, state, _radio]); </s> remove const combinedProps = combineContextAndProps(formControlContext, props);
</s> add const combinedProps = combineContextAndProps(
{ ...formControlContext, ...contextState },
props
); </s> remove
const combinedProps = combineContextAndProps(formControlContext, props);
</s> add const combinedProps = combineContextAndProps(
{ ...formControlContext, ...contextState },
props
); </s> remove { size, colorScheme, ...props }: IRadioGroupProps,
</s> add { size, colorScheme, _radio, ...props }: IRadioGroupProps, | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3a3ac9edcd2fffc1c26da5ecc62615af0d2df284 | src/components/primitives/Radio/RadioGroup.tsx |
}, [size, colorScheme, formControlContext, state, _radio]); | <mask> size,
<mask> colorScheme,
<mask> state,
<mask> };
<mask> }, [size, colorScheme, formControlContext, state]);
<mask>
<mask> const radioGroupProps = React.useMemo(
<mask> () => radioGroupState.radioGroupProps,
<mask> // eslint-disable-next-line react-hooks/exhaustive-deps
<mask> []
</s> feat: added new pseudo prop for RadioGroup and CheckboxGroup </s> remove const combinedProps = combineContextAndProps(formControlContext, props);
</s> add const combinedProps = combineContextAndProps(
{ ...formControlContext, ...contextState },
props
); </s> remove
const combinedProps = combineContextAndProps(formControlContext, props);
</s> add const combinedProps = combineContextAndProps(
{ ...formControlContext, ...contextState },
props
); </s> remove { size, colorScheme, ...props }: IRadioGroupProps,
</s> add { size, colorScheme, _radio, ...props }: IRadioGroupProps, </s> remove { size, colorScheme, ...props }: ICheckboxGroupProps,
</s> add { size, _checkbox, colorScheme, ...props }: ICheckboxGroupProps, | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3a3ac9edcd2fffc1c26da5ecc62615af0d2df284 | src/components/primitives/Radio/RadioGroup.tsx |
/**
* Pass props will be passed to each radio.
*/
_radio?: IRadioProps; | <mask> * The callback fired when any children radio is checked or unchecked.
<mask> */
<mask> onChange?: IRadioGroupOnChangeHandler;
<mask> }
<mask> export interface IRadioContext extends IFormControlContext {
<mask> colorScheme?: string;
<mask> size?: ResponsiveValue<ISizes | (string & {}) | number>;
<mask> state: RadioGroupState;
<mask> }
</s> feat: added new pseudo prop for RadioGroup and CheckboxGroup </s> remove { size, colorScheme, ...props }: ICheckboxGroupProps,
</s> add { size, _checkbox, colorScheme, ...props }: ICheckboxGroupProps, </s> remove } = usePropsResolution('Checkbox', inputProps, {
isInvalid,
isReadOnly,
isIndeterminate,
isDisabled,
isChecked,
isHovered,
isPressed,
isFocused,
});
</s> add } = usePropsResolution(
'Checkbox',
{ ...combinedProps, ...inputProps },
{
isInvalid,
isReadOnly,
isIndeterminate,
isDisabled,
isChecked,
isHovered,
isPressed,
isFocused,
}
); </s> remove { size, colorScheme, ...props }: IRadioGroupProps,
</s> add { size, colorScheme, _radio, ...props }: IRadioGroupProps, </s> remove const combinedProps = combineContextAndProps(formControlContext, props);
</s> add const combinedProps = combineContextAndProps(
{ ...formControlContext, ...contextState },
props
); | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3a3ac9edcd2fffc1c26da5ecc62615af0d2df284 | src/components/primitives/Radio/types.tsx |
"node_modules",
".git" | <mask> {
<mask> "ignore_dirs": [
<mask> ".git",
<mask> "node_modules"
<mask> ]
<mask> }
</s> Fixed SafeAreaView application on Header, Footer and Content components (#2972)
Fixes #2291
- Added SafeAreaView to Header, Content and Footer
- Removed unused state and methods for calculating padding/margins
- Added utility to get style object
- Set background color of SafeAreaView to that of parent component </s> remove constructor(props) {
super(props);
this.state = {
orientation:
variable.deviceHeight > variable.deviceWidth ? 'portrait' : 'landscape'
};
}
layoutChange(val) {
const maxComp = Math.max(variable.deviceWidth, variable.deviceHeight);
if (val.width >= maxComp) this.setState({ orientation: 'landscape' });
else {
this.setState({ orientation: 'portrait' });
}
}
calculateHeight(mode, inSet) {
const { style } = this.props;
let inset = null;
if (inSet !== undefined) {
inset = inSet;
} else {
inset = variable.Inset;
}
const InsetValues = mode === 'portrait' ? inset.portrait : inset.landscape;
let oldHeight = null;
if (style.height !== undefined) {
oldHeight = style.height;
} else if (style[1]) {
oldHeight = style[1].height || style[0].height;
} else {
oldHeight = style[0].height;
}
const height = oldHeight + InsetValues.bottomInset;
return height;
}
</s> add </s> remove import { View, StatusBar, StyleSheet, ViewPropTypes } from 'react-native';
</s> add import { View, StatusBar, ViewPropTypes, SafeAreaView } from 'react-native'; </s> remove constructor(props) {
super(props);
this.state = {
orientation: 'portrait'
};
}
layoutChange(val) {
const maxComp = Math.max(variable.deviceWidth, variable.deviceHeight);
if (val.width >= maxComp) this.setState({ orientation: 'landscape' });
else this.setState({ orientation: 'portrait' });
}
calculateHeight(mode, inSet) {
const { style } = this.props;
let inset = null;
if (inSet !== undefined) {
inset = inSet;
} else {
inset = variable.Inset;
}
const InsetValues = mode === 'portrait' ? inset.portrait : inset.landscape;
let oldHeight = null;
if (style.height !== undefined) {
oldHeight = style.height;
} else if (style[1]) {
oldHeight = style[1].height ? style[1].height : style[0].height;
} else {
oldHeight = style[0].height;
}
const height = oldHeight + InsetValues.topInset;
return height;
}
calculatePadder(mode, inSet) {
let inset = null;
if (inSet !== undefined) {
inset = inSet;
} else {
inset = variable.Inset;
}
const InsetValues = mode === 'portrait' ? inset.portrait : inset.landscape;
let topPadder = null;
const style = StyleSheet.flatten(this.props.style);
if (style.padding !== undefined || style.paddingTop !== undefined) {
topPadder =
(style.paddingTop ? style.paddingTop : get(style, 'padding', 0)) +
InsetValues.topInset;
} else {
topPadder = InsetValues.topInset;
}
return topPadder;
}
</s> add </s> remove calculatePadder(mode, inSet) {
const { style } = this.props;
let inset = null;
if (inSet !== undefined) {
inset = inSet;
} else {
inset = variable.Inset;
}
const InsetValues = mode === 'portrait' ? inset.portrait : inset.landscape;
let bottomPadder = null;
if (style[1] !== undefined) {
if (style[1].padding !== undefined || style[1].paddingTop !== undefined) {
bottomPadder =
(style[1].paddingTop || style[1].padding) + InsetValues.bottomInset;
}
} else if (style.padding !== undefined && style.paddingTop !== undefined) {
bottomPadder =
(style.paddingTop || style.padding) + InsetValues.bottomInset;
} else {
bottomPadder = InsetValues.bottomInset;
}
return bottomPadder;
}
</s> add </s> remove import { get } from 'lodash';
</s> add | [
"keep",
"keep",
"replace",
"replace",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3a4965c579c7cb53f9d2621a74b39e0f97cd04fd | .watchmanconfig |
import getStyle from '../utils/getStyle'; | <mask>
<mask> import variable from '../theme/variables/platform';
<mask> import mapPropsToStyleNames from '../utils/mapPropsToStyleNames';
<mask>
<mask> class Content extends Component {
<mask> static contextTypes = {
<mask> theme: PropTypes.object
<mask> };
<mask>
</s> Fixed SafeAreaView application on Header, Footer and Content components (#2972)
Fixes #2291
- Added SafeAreaView to Header, Content and Footer
- Removed unused state and methods for calculating padding/margins
- Added utility to get style object
- Set background color of SafeAreaView to that of parent component </s> remove import variable from '../theme/variables/platform';
</s> add </s> remove import { View, StatusBar, StyleSheet, ViewPropTypes } from 'react-native';
</s> add import { View, StatusBar, ViewPropTypes, SafeAreaView } from 'react-native'; </s> remove import { View, ViewPropTypes } from 'react-native';
</s> add import { View, ViewPropTypes, SafeAreaView } from 'react-native'; | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3a4965c579c7cb53f9d2621a74b39e0f97cd04fd | src/basic/Content.js |
<mask> static contextTypes = {
<mask> theme: PropTypes.object
<mask> };
<mask>
<mask> constructor(props) {
<mask> super(props);
<mask> this.state = {
<mask> orientation: 'portrait'
<mask> };
<mask> }
<mask>
<mask> layoutChange(val) {
<mask> const maxComp = Math.max(variable.deviceWidth, variable.deviceHeight);
<mask>
<mask> if (val.width >= maxComp) this.setState({ orientation: 'landscape' });
<mask> else {
<mask> this.setState({ orientation: 'portrait' });
<mask> }
<mask> }
<mask>
<mask> render() {
<mask> const {
<mask> children,
<mask> contentContainerStyle,
<mask> disableKBDismissScroll,
</s> Fixed SafeAreaView application on Header, Footer and Content components (#2972)
Fixes #2291
- Added SafeAreaView to Header, Content and Footer
- Removed unused state and methods for calculating padding/margins
- Added utility to get style object
- Set background color of SafeAreaView to that of parent component </s> remove constructor(props) {
super(props);
this.state = {
orientation:
variable.deviceHeight > variable.deviceWidth ? 'portrait' : 'landscape'
};
}
layoutChange(val) {
const maxComp = Math.max(variable.deviceWidth, variable.deviceHeight);
if (val.width >= maxComp) this.setState({ orientation: 'landscape' });
else {
this.setState({ orientation: 'portrait' });
}
}
calculateHeight(mode, inSet) {
const { style } = this.props;
let inset = null;
if (inSet !== undefined) {
inset = inSet;
} else {
inset = variable.Inset;
}
const InsetValues = mode === 'portrait' ? inset.portrait : inset.landscape;
let oldHeight = null;
if (style.height !== undefined) {
oldHeight = style.height;
} else if (style[1]) {
oldHeight = style[1].height || style[0].height;
} else {
oldHeight = style[0].height;
}
const height = oldHeight + InsetValues.bottomInset;
return height;
}
</s> add </s> remove constructor(props) {
super(props);
this.state = {
orientation: 'portrait'
};
}
layoutChange(val) {
const maxComp = Math.max(variable.deviceWidth, variable.deviceHeight);
if (val.width >= maxComp) this.setState({ orientation: 'landscape' });
else this.setState({ orientation: 'portrait' });
}
calculateHeight(mode, inSet) {
const { style } = this.props;
let inset = null;
if (inSet !== undefined) {
inset = inSet;
} else {
inset = variable.Inset;
}
const InsetValues = mode === 'portrait' ? inset.portrait : inset.landscape;
let oldHeight = null;
if (style.height !== undefined) {
oldHeight = style.height;
} else if (style[1]) {
oldHeight = style[1].height ? style[1].height : style[0].height;
} else {
oldHeight = style[0].height;
}
const height = oldHeight + InsetValues.topInset;
return height;
}
calculatePadder(mode, inSet) {
let inset = null;
if (inSet !== undefined) {
inset = inSet;
} else {
inset = variable.Inset;
}
const InsetValues = mode === 'portrait' ? inset.portrait : inset.landscape;
let topPadder = null;
const style = StyleSheet.flatten(this.props.style);
if (style.padding !== undefined || style.paddingTop !== undefined) {
topPadder =
(style.paddingTop ? style.paddingTop : get(style, 'padding', 0)) +
InsetValues.topInset;
} else {
topPadder = InsetValues.topInset;
}
return topPadder;
}
</s> add </s> remove calculatePadder(mode, inSet) {
const { style } = this.props;
let inset = null;
if (inSet !== undefined) {
inset = inSet;
} else {
inset = variable.Inset;
}
const InsetValues = mode === 'portrait' ? inset.portrait : inset.landscape;
let bottomPadder = null;
if (style[1] !== undefined) {
if (style[1].padding !== undefined || style[1].paddingTop !== undefined) {
bottomPadder =
(style[1].paddingTop || style[1].padding) + InsetValues.bottomInset;
}
} else if (style.padding !== undefined && style.paddingTop !== undefined) {
bottomPadder =
(style.paddingTop || style.padding) + InsetValues.bottomInset;
} else {
bottomPadder = InsetValues.bottomInset;
}
return bottomPadder;
}
</s> add </s> remove const containerStyle = { flex: 1 };
</s> add const containerStyle = {
flex: 1,
backgroundColor: getStyle(style).backgroundColor
};
| [
"keep",
"keep",
"keep",
"keep",
"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/3a4965c579c7cb53f9d2621a74b39e0f97cd04fd | src/basic/Content.js | |
const containerStyle = {
flex: 1,
backgroundColor: getStyle(style).backgroundColor
};
| <mask> keyboardShouldPersistTaps,
<mask> padder,
<mask> style
<mask> } = this.props;
<mask> const containerStyle = { flex: 1 };
<mask> const variables = this.context.theme
<mask> ? this.context.theme['@@shoutem.theme/themeStyle'].variables
<mask> : variable;
<mask>
<mask> return variables.isIphoneX ? (
</s> Fixed SafeAreaView application on Header, Footer and Content components (#2972)
Fixes #2291
- Added SafeAreaView to Header, Content and Footer
- Removed unused state and methods for calculating padding/margins
- Added utility to get style object
- Set background color of SafeAreaView to that of parent component </s> remove return variables.isIphoneX ? (
</s> add return ( </s> remove const variables = this.context.theme
? this.context.theme['@@shoutem.theme/themeStyle'].variables
: variable;
return variables.isIphoneX ? (
<View
ref={c => (this._root = c)}
{...this.props}
onLayout={e => this.layoutChange(e.nativeEvent.layout)}
style={[
style,
{
height: this.calculateHeight(
this.state.orientation,
variables.Inset
),
paddingBottom: this.calculatePadder(
this.state.orientation,
variables.Inset
)
}
]}
/>
) : (
<View ref={c => (this._root = c)} {...this.props} />
</s> add return (
<SafeAreaView
style={{
backgroundColor: getStyle(style).backgroundColor
}}
>
<View ref={c => (this._root = c)} {...this.props} />
</SafeAreaView> </s> remove const { orientation } = this.state;
</s> add </s> remove calculatePadder(mode, inSet) {
const { style } = this.props;
let inset = null;
if (inSet !== undefined) {
inset = inSet;
} else {
inset = variable.Inset;
}
const InsetValues = mode === 'portrait' ? inset.portrait : inset.landscape;
let bottomPadder = null;
if (style[1] !== undefined) {
if (style[1].padding !== undefined || style[1].paddingTop !== undefined) {
bottomPadder =
(style[1].paddingTop || style[1].padding) + InsetValues.bottomInset;
}
} else if (style.padding !== undefined && style.paddingTop !== undefined) {
bottomPadder =
(style.paddingTop || style.padding) + InsetValues.bottomInset;
} else {
bottomPadder = InsetValues.bottomInset;
}
return bottomPadder;
}
</s> add </s> remove constructor(props) {
super(props);
this.state = {
orientation:
variable.deviceHeight > variable.deviceWidth ? 'portrait' : 'landscape'
};
}
layoutChange(val) {
const maxComp = Math.max(variable.deviceWidth, variable.deviceHeight);
if (val.width >= maxComp) this.setState({ orientation: 'landscape' });
else {
this.setState({ orientation: 'portrait' });
}
}
calculateHeight(mode, inSet) {
const { style } = this.props;
let inset = null;
if (inSet !== undefined) {
inset = inSet;
} else {
inset = variable.Inset;
}
const InsetValues = mode === 'portrait' ? inset.portrait : inset.landscape;
let oldHeight = null;
if (style.height !== undefined) {
oldHeight = style.height;
} else if (style[1]) {
oldHeight = style[1].height || style[0].height;
} else {
oldHeight = style[0].height;
}
const height = oldHeight + InsetValues.bottomInset;
return height;
}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3a4965c579c7cb53f9d2621a74b39e0f97cd04fd | src/basic/Content.js |
return ( | <mask> const variables = this.context.theme
<mask> ? this.context.theme['@@shoutem.theme/themeStyle'].variables
<mask> : variable;
<mask>
<mask> return variables.isIphoneX ? (
<mask> <SafeAreaView style={containerStyle}>
<mask> <KeyboardAwareScrollView
<mask> automaticallyAdjustContentInsets={false}
<mask> resetScrollToCoords={disableKBDismissScroll ? null : { x: 0, y: 0 }}
<mask> keyboardShouldPersistTaps={keyboardShouldPersistTaps || 'handled'}
</s> Fixed SafeAreaView application on Header, Footer and Content components (#2972)
Fixes #2291
- Added SafeAreaView to Header, Content and Footer
- Removed unused state and methods for calculating padding/margins
- Added utility to get style object
- Set background color of SafeAreaView to that of parent component </s> remove ) : (
<KeyboardAwareScrollView
automaticallyAdjustContentInsets={false}
resetScrollToCoords={disableKBDismissScroll ? null : { x: 0, y: 0 }}
keyboardShouldPersistTaps={keyboardShouldPersistTaps || 'handled'}
ref={c => {
this._scrollview = c;
this._root = c;
}}
{...this.props}
contentContainerStyle={[
{ padding: padder ? variables.contentPadding : undefined },
contentContainerStyle
]}
>
{children}
</KeyboardAwareScrollView>
</s> add </s> remove const containerStyle = { flex: 1 };
</s> add const containerStyle = {
flex: 1,
backgroundColor: getStyle(style).backgroundColor
};
</s> remove const variables = this.context.theme
? this.context.theme['@@shoutem.theme/themeStyle'].variables
: variable;
return variables.isIphoneX ? (
<View
ref={c => (this._root = c)}
{...this.props}
onLayout={e => this.layoutChange(e.nativeEvent.layout)}
style={[
style,
{
height: this.calculateHeight(
this.state.orientation,
variables.Inset
),
paddingBottom: this.calculatePadder(
this.state.orientation,
variables.Inset
)
}
]}
/>
) : (
<View ref={c => (this._root = c)} {...this.props} />
</s> add return (
<SafeAreaView
style={{
backgroundColor: getStyle(style).backgroundColor
}}
>
<View ref={c => (this._root = c)} {...this.props} />
</SafeAreaView> </s> remove const { orientation } = this.state;
</s> add </s> remove calculatePadder(mode, inSet) {
const { style } = this.props;
let inset = null;
if (inSet !== undefined) {
inset = inSet;
} else {
inset = variable.Inset;
}
const InsetValues = mode === 'portrait' ? inset.portrait : inset.landscape;
let bottomPadder = null;
if (style[1] !== undefined) {
if (style[1].padding !== undefined || style[1].paddingTop !== undefined) {
bottomPadder =
(style[1].paddingTop || style[1].padding) + InsetValues.bottomInset;
}
} else if (style.padding !== undefined && style.paddingTop !== undefined) {
bottomPadder =
(style.paddingTop || style.padding) + InsetValues.bottomInset;
} else {
bottomPadder = InsetValues.bottomInset;
}
return bottomPadder;
}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3a4965c579c7cb53f9d2621a74b39e0f97cd04fd | src/basic/Content.js |
<mask> this._scrollview = c;
<mask> this._root = c;
<mask> }}
<mask> {...this.props}
<mask> style={style}
<mask> contentContainerStyle={[
<mask> { padding: padder ? variables.contentPadding : undefined },
<mask> contentContainerStyle
<mask> ]}
<mask> >
</s> Fixed SafeAreaView application on Header, Footer and Content components (#2972)
Fixes #2291
- Added SafeAreaView to Header, Content and Footer
- Removed unused state and methods for calculating padding/margins
- Added utility to get style object
- Set background color of SafeAreaView to that of parent component </s> remove ) : (
<KeyboardAwareScrollView
automaticallyAdjustContentInsets={false}
resetScrollToCoords={disableKBDismissScroll ? null : { x: 0, y: 0 }}
keyboardShouldPersistTaps={keyboardShouldPersistTaps || 'handled'}
ref={c => {
this._scrollview = c;
this._root = c;
}}
{...this.props}
contentContainerStyle={[
{ padding: padder ? variables.contentPadding : undefined },
contentContainerStyle
]}
>
{children}
</KeyboardAwareScrollView>
</s> add </s> remove {variables.isIphoneX ? (
<View
ref={c => (this._root = c)}
{...this.props}
style={[
style,
{
height: this.calculateHeight(orientation, variables.Inset),
paddingTop: this.calculatePadder(orientation, variables.Inset)
}
]}
/>
) : (
</s> add <SafeAreaView
style={{
backgroundColor: getStyle(style).backgroundColor
}}
> </s> remove const variables = this.context.theme
? this.context.theme['@@shoutem.theme/themeStyle'].variables
: variable;
return variables.isIphoneX ? (
<View
ref={c => (this._root = c)}
{...this.props}
onLayout={e => this.layoutChange(e.nativeEvent.layout)}
style={[
style,
{
height: this.calculateHeight(
this.state.orientation,
variables.Inset
),
paddingBottom: this.calculatePadder(
this.state.orientation,
variables.Inset
)
}
]}
/>
) : (
<View ref={c => (this._root = c)} {...this.props} />
</s> add return (
<SafeAreaView
style={{
backgroundColor: getStyle(style).backgroundColor
}}
>
<View ref={c => (this._root = c)} {...this.props} />
</SafeAreaView> </s> remove calculatePadder(mode, inSet) {
const { style } = this.props;
let inset = null;
if (inSet !== undefined) {
inset = inSet;
} else {
inset = variable.Inset;
}
const InsetValues = mode === 'portrait' ? inset.portrait : inset.landscape;
let bottomPadder = null;
if (style[1] !== undefined) {
if (style[1].padding !== undefined || style[1].paddingTop !== undefined) {
bottomPadder =
(style[1].paddingTop || style[1].padding) + InsetValues.bottomInset;
}
} else if (style.padding !== undefined && style.paddingTop !== undefined) {
bottomPadder =
(style.paddingTop || style.padding) + InsetValues.bottomInset;
} else {
bottomPadder = InsetValues.bottomInset;
}
return bottomPadder;
}
</s> add </s> remove )}
</s> add </SafeAreaView> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3a4965c579c7cb53f9d2621a74b39e0f97cd04fd | src/basic/Content.js | |
<mask> >
<mask> {children}
<mask> </KeyboardAwareScrollView>
<mask> </SafeAreaView>
<mask> ) : (
<mask> <KeyboardAwareScrollView
<mask> automaticallyAdjustContentInsets={false}
<mask> resetScrollToCoords={disableKBDismissScroll ? null : { x: 0, y: 0 }}
<mask> keyboardShouldPersistTaps={keyboardShouldPersistTaps || 'handled'}
<mask> ref={c => {
<mask> this._scrollview = c;
<mask> this._root = c;
<mask> }}
<mask> {...this.props}
<mask> contentContainerStyle={[
<mask> { padding: padder ? variables.contentPadding : undefined },
<mask> contentContainerStyle
<mask> ]}
<mask> >
<mask> {children}
<mask> </KeyboardAwareScrollView>
<mask> );
<mask> }
<mask> }
<mask>
<mask> Content.propTypes = {
</s> Fixed SafeAreaView application on Header, Footer and Content components (#2972)
Fixes #2291
- Added SafeAreaView to Header, Content and Footer
- Removed unused state and methods for calculating padding/margins
- Added utility to get style object
- Set background color of SafeAreaView to that of parent component </s> remove style={style}
</s> add </s> remove return variables.isIphoneX ? (
</s> add return ( </s> remove const variables = this.context.theme
? this.context.theme['@@shoutem.theme/themeStyle'].variables
: variable;
return variables.isIphoneX ? (
<View
ref={c => (this._root = c)}
{...this.props}
onLayout={e => this.layoutChange(e.nativeEvent.layout)}
style={[
style,
{
height: this.calculateHeight(
this.state.orientation,
variables.Inset
),
paddingBottom: this.calculatePadder(
this.state.orientation,
variables.Inset
)
}
]}
/>
) : (
<View ref={c => (this._root = c)} {...this.props} />
</s> add return (
<SafeAreaView
style={{
backgroundColor: getStyle(style).backgroundColor
}}
>
<View ref={c => (this._root = c)} {...this.props} />
</SafeAreaView> </s> remove {variables.isIphoneX ? (
<View
ref={c => (this._root = c)}
{...this.props}
style={[
style,
{
height: this.calculateHeight(orientation, variables.Inset),
paddingTop: this.calculatePadder(orientation, variables.Inset)
}
]}
/>
) : (
</s> add <SafeAreaView
style={{
backgroundColor: getStyle(style).backgroundColor
}}
> </s> remove )}
</s> add </SafeAreaView> | [
"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/3a4965c579c7cb53f9d2621a74b39e0f97cd04fd | src/basic/Content.js | |
import { View, ViewPropTypes, SafeAreaView } from 'react-native'; | <mask> import React, { Component } from 'react';
<mask> import PropTypes from 'prop-types';
<mask> import { View, ViewPropTypes } from 'react-native';
<mask> import { connectStyle } from 'native-base-shoutem-theme';
<mask>
<mask> import variable from '../theme/variables/platform';
<mask> import mapPropsToStyleNames from '../utils/mapPropsToStyleNames';
<mask>
</s> Fixed SafeAreaView application on Header, Footer and Content components (#2972)
Fixes #2291
- Added SafeAreaView to Header, Content and Footer
- Removed unused state and methods for calculating padding/margins
- Added utility to get style object
- Set background color of SafeAreaView to that of parent component </s> remove import { View, StatusBar, StyleSheet, ViewPropTypes } from 'react-native';
</s> add import { View, StatusBar, ViewPropTypes, SafeAreaView } from 'react-native'; </s> remove import variable from '../theme/variables/platform';
</s> add </s> remove import { get } from 'lodash';
</s> add | [
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3a4965c579c7cb53f9d2621a74b39e0f97cd04fd | src/basic/Footer.js |
<mask> import PropTypes from 'prop-types';
<mask> import { View, ViewPropTypes } from 'react-native';
<mask> import { connectStyle } from 'native-base-shoutem-theme';
<mask>
<mask> import variable from '../theme/variables/platform';
<mask> import mapPropsToStyleNames from '../utils/mapPropsToStyleNames';
<mask>
<mask> class Footer extends Component {
<mask> static contextTypes = {
<mask> theme: PropTypes.object
</s> Fixed SafeAreaView application on Header, Footer and Content components (#2972)
Fixes #2291
- Added SafeAreaView to Header, Content and Footer
- Removed unused state and methods for calculating padding/margins
- Added utility to get style object
- Set background color of SafeAreaView to that of parent component </s> remove import { View, StatusBar, StyleSheet, ViewPropTypes } from 'react-native';
</s> add import { View, StatusBar, ViewPropTypes, SafeAreaView } from 'react-native'; </s> remove import { View, ViewPropTypes } from 'react-native';
</s> add import { View, ViewPropTypes, SafeAreaView } from 'react-native'; </s> remove import { get } from 'lodash';
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3a4965c579c7cb53f9d2621a74b39e0f97cd04fd | src/basic/Footer.js | |
import getStyle from '../utils/getStyle'; | <mask>
<mask> import mapPropsToStyleNames from '../utils/mapPropsToStyleNames';
<mask>
<mask> class Footer extends Component {
<mask> static contextTypes = {
<mask> theme: PropTypes.object
</s> Fixed SafeAreaView application on Header, Footer and Content components (#2972)
Fixes #2291
- Added SafeAreaView to Header, Content and Footer
- Removed unused state and methods for calculating padding/margins
- Added utility to get style object
- Set background color of SafeAreaView to that of parent component </s> remove import variable from '../theme/variables/platform';
</s> add </s> remove import { View, StatusBar, StyleSheet, ViewPropTypes } from 'react-native';
</s> add import { View, StatusBar, ViewPropTypes, SafeAreaView } from 'react-native'; </s> remove import { View, ViewPropTypes } from 'react-native';
</s> add import { View, ViewPropTypes, SafeAreaView } from 'react-native'; | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3a4965c579c7cb53f9d2621a74b39e0f97cd04fd | src/basic/Footer.js |
<mask> class Footer extends Component {
<mask> static contextTypes = {
<mask> theme: PropTypes.object
<mask> };
<mask> constructor(props) {
<mask> super(props);
<mask> this.state = {
<mask> orientation:
<mask> variable.deviceHeight > variable.deviceWidth ? 'portrait' : 'landscape'
<mask> };
<mask> }
<mask> layoutChange(val) {
<mask> const maxComp = Math.max(variable.deviceWidth, variable.deviceHeight);
<mask> if (val.width >= maxComp) this.setState({ orientation: 'landscape' });
<mask> else {
<mask> this.setState({ orientation: 'portrait' });
<mask> }
<mask> }
<mask>
<mask> calculateHeight(mode, inSet) {
<mask> const { style } = this.props;
<mask> let inset = null;
<mask> if (inSet !== undefined) {
<mask> inset = inSet;
<mask> } else {
<mask> inset = variable.Inset;
<mask> }
<mask> const InsetValues = mode === 'portrait' ? inset.portrait : inset.landscape;
<mask> let oldHeight = null;
<mask> if (style.height !== undefined) {
<mask> oldHeight = style.height;
<mask> } else if (style[1]) {
<mask> oldHeight = style[1].height || style[0].height;
<mask> } else {
<mask> oldHeight = style[0].height;
<mask> }
<mask> const height = oldHeight + InsetValues.bottomInset;
<mask> return height;
<mask> }
<mask>
<mask> calculatePadder(mode, inSet) {
<mask> const { style } = this.props;
<mask> let inset = null;
<mask> if (inSet !== undefined) {
</s> Fixed SafeAreaView application on Header, Footer and Content components (#2972)
Fixes #2291
- Added SafeAreaView to Header, Content and Footer
- Removed unused state and methods for calculating padding/margins
- Added utility to get style object
- Set background color of SafeAreaView to that of parent component </s> remove constructor(props) {
super(props);
this.state = {
orientation: 'portrait'
};
}
layoutChange(val) {
const maxComp = Math.max(variable.deviceWidth, variable.deviceHeight);
if (val.width >= maxComp) this.setState({ orientation: 'landscape' });
else this.setState({ orientation: 'portrait' });
}
calculateHeight(mode, inSet) {
const { style } = this.props;
let inset = null;
if (inSet !== undefined) {
inset = inSet;
} else {
inset = variable.Inset;
}
const InsetValues = mode === 'portrait' ? inset.portrait : inset.landscape;
let oldHeight = null;
if (style.height !== undefined) {
oldHeight = style.height;
} else if (style[1]) {
oldHeight = style[1].height ? style[1].height : style[0].height;
} else {
oldHeight = style[0].height;
}
const height = oldHeight + InsetValues.topInset;
return height;
}
calculatePadder(mode, inSet) {
let inset = null;
if (inSet !== undefined) {
inset = inSet;
} else {
inset = variable.Inset;
}
const InsetValues = mode === 'portrait' ? inset.portrait : inset.landscape;
let topPadder = null;
const style = StyleSheet.flatten(this.props.style);
if (style.padding !== undefined || style.paddingTop !== undefined) {
topPadder =
(style.paddingTop ? style.paddingTop : get(style, 'padding', 0)) +
InsetValues.topInset;
} else {
topPadder = InsetValues.topInset;
}
return topPadder;
}
</s> add </s> remove calculatePadder(mode, inSet) {
const { style } = this.props;
let inset = null;
if (inSet !== undefined) {
inset = inSet;
} else {
inset = variable.Inset;
}
const InsetValues = mode === 'portrait' ? inset.portrait : inset.landscape;
let bottomPadder = null;
if (style[1] !== undefined) {
if (style[1].padding !== undefined || style[1].paddingTop !== undefined) {
bottomPadder =
(style[1].paddingTop || style[1].padding) + InsetValues.bottomInset;
}
} else if (style.padding !== undefined && style.paddingTop !== undefined) {
bottomPadder =
(style.paddingTop || style.padding) + InsetValues.bottomInset;
} else {
bottomPadder = InsetValues.bottomInset;
}
return bottomPadder;
}
</s> add </s> remove constructor(props) {
super(props);
this.state = {
orientation: 'portrait'
};
}
layoutChange(val) {
const maxComp = Math.max(variable.deviceWidth, variable.deviceHeight);
if (val.width >= maxComp) this.setState({ orientation: 'landscape' });
else {
this.setState({ orientation: 'portrait' });
}
}
</s> add </s> remove const containerStyle = { flex: 1 };
</s> add const containerStyle = {
flex: 1,
backgroundColor: getStyle(style).backgroundColor
};
</s> remove const variables = this.context.theme
? this.context.theme['@@shoutem.theme/themeStyle'].variables
: variable;
return variables.isIphoneX ? (
<View
ref={c => (this._root = c)}
{...this.props}
onLayout={e => this.layoutChange(e.nativeEvent.layout)}
style={[
style,
{
height: this.calculateHeight(
this.state.orientation,
variables.Inset
),
paddingBottom: this.calculatePadder(
this.state.orientation,
variables.Inset
)
}
]}
/>
) : (
<View ref={c => (this._root = c)} {...this.props} />
</s> add return (
<SafeAreaView
style={{
backgroundColor: getStyle(style).backgroundColor
}}
>
<View ref={c => (this._root = c)} {...this.props} />
</SafeAreaView> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"re... | https://github.com/GeekyAnts/NativeBase/commit/3a4965c579c7cb53f9d2621a74b39e0f97cd04fd | src/basic/Footer.js | |
<mask> const height = oldHeight + InsetValues.bottomInset;
<mask> return height;
<mask> }
<mask>
<mask> calculatePadder(mode, inSet) {
<mask> const { style } = this.props;
<mask> let inset = null;
<mask> if (inSet !== undefined) {
<mask> inset = inSet;
<mask> } else {
<mask> inset = variable.Inset;
<mask> }
<mask> const InsetValues = mode === 'portrait' ? inset.portrait : inset.landscape;
<mask> let bottomPadder = null;
<mask> if (style[1] !== undefined) {
<mask> if (style[1].padding !== undefined || style[1].paddingTop !== undefined) {
<mask> bottomPadder =
<mask> (style[1].paddingTop || style[1].padding) + InsetValues.bottomInset;
<mask> }
<mask> } else if (style.padding !== undefined && style.paddingTop !== undefined) {
<mask> bottomPadder =
<mask> (style.paddingTop || style.padding) + InsetValues.bottomInset;
<mask> } else {
<mask> bottomPadder = InsetValues.bottomInset;
<mask> }
<mask> return bottomPadder;
<mask> }
<mask> render() {
<mask> const { style } = this.props;
<mask> const variables = this.context.theme
<mask> ? this.context.theme['@@shoutem.theme/themeStyle'].variables
<mask> : variable;
</s> Fixed SafeAreaView application on Header, Footer and Content components (#2972)
Fixes #2291
- Added SafeAreaView to Header, Content and Footer
- Removed unused state and methods for calculating padding/margins
- Added utility to get style object
- Set background color of SafeAreaView to that of parent component </s> remove constructor(props) {
super(props);
this.state = {
orientation: 'portrait'
};
}
layoutChange(val) {
const maxComp = Math.max(variable.deviceWidth, variable.deviceHeight);
if (val.width >= maxComp) this.setState({ orientation: 'landscape' });
else this.setState({ orientation: 'portrait' });
}
calculateHeight(mode, inSet) {
const { style } = this.props;
let inset = null;
if (inSet !== undefined) {
inset = inSet;
} else {
inset = variable.Inset;
}
const InsetValues = mode === 'portrait' ? inset.portrait : inset.landscape;
let oldHeight = null;
if (style.height !== undefined) {
oldHeight = style.height;
} else if (style[1]) {
oldHeight = style[1].height ? style[1].height : style[0].height;
} else {
oldHeight = style[0].height;
}
const height = oldHeight + InsetValues.topInset;
return height;
}
calculatePadder(mode, inSet) {
let inset = null;
if (inSet !== undefined) {
inset = inSet;
} else {
inset = variable.Inset;
}
const InsetValues = mode === 'portrait' ? inset.portrait : inset.landscape;
let topPadder = null;
const style = StyleSheet.flatten(this.props.style);
if (style.padding !== undefined || style.paddingTop !== undefined) {
topPadder =
(style.paddingTop ? style.paddingTop : get(style, 'padding', 0)) +
InsetValues.topInset;
} else {
topPadder = InsetValues.topInset;
}
return topPadder;
}
</s> add </s> remove constructor(props) {
super(props);
this.state = {
orientation:
variable.deviceHeight > variable.deviceWidth ? 'portrait' : 'landscape'
};
}
layoutChange(val) {
const maxComp = Math.max(variable.deviceWidth, variable.deviceHeight);
if (val.width >= maxComp) this.setState({ orientation: 'landscape' });
else {
this.setState({ orientation: 'portrait' });
}
}
calculateHeight(mode, inSet) {
const { style } = this.props;
let inset = null;
if (inSet !== undefined) {
inset = inSet;
} else {
inset = variable.Inset;
}
const InsetValues = mode === 'portrait' ? inset.portrait : inset.landscape;
let oldHeight = null;
if (style.height !== undefined) {
oldHeight = style.height;
} else if (style[1]) {
oldHeight = style[1].height || style[0].height;
} else {
oldHeight = style[0].height;
}
const height = oldHeight + InsetValues.bottomInset;
return height;
}
</s> add </s> remove constructor(props) {
super(props);
this.state = {
orientation: 'portrait'
};
}
layoutChange(val) {
const maxComp = Math.max(variable.deviceWidth, variable.deviceHeight);
if (val.width >= maxComp) this.setState({ orientation: 'landscape' });
else {
this.setState({ orientation: 'portrait' });
}
}
</s> add </s> remove const variables = this.context.theme
? this.context.theme['@@shoutem.theme/themeStyle'].variables
: variable;
return variables.isIphoneX ? (
<View
ref={c => (this._root = c)}
{...this.props}
onLayout={e => this.layoutChange(e.nativeEvent.layout)}
style={[
style,
{
height: this.calculateHeight(
this.state.orientation,
variables.Inset
),
paddingBottom: this.calculatePadder(
this.state.orientation,
variables.Inset
)
}
]}
/>
) : (
<View ref={c => (this._root = c)} {...this.props} />
</s> add return (
<SafeAreaView
style={{
backgroundColor: getStyle(style).backgroundColor
}}
>
<View ref={c => (this._root = c)} {...this.props} />
</SafeAreaView> </s> remove const containerStyle = { flex: 1 };
</s> add const containerStyle = {
flex: 1,
backgroundColor: getStyle(style).backgroundColor
};
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"re... | https://github.com/GeekyAnts/NativeBase/commit/3a4965c579c7cb53f9d2621a74b39e0f97cd04fd | src/basic/Footer.js | |
return (
<SafeAreaView
style={{
backgroundColor: getStyle(style).backgroundColor
}}
>
<View ref={c => (this._root = c)} {...this.props} />
</SafeAreaView> | <mask> return bottomPadder;
<mask> }
<mask> render() {
<mask> const { style } = this.props;
<mask> const variables = this.context.theme
<mask> ? this.context.theme['@@shoutem.theme/themeStyle'].variables
<mask> : variable;
<mask> return variables.isIphoneX ? (
<mask> <View
<mask> ref={c => (this._root = c)}
<mask> {...this.props}
<mask> onLayout={e => this.layoutChange(e.nativeEvent.layout)}
<mask> style={[
<mask> style,
<mask> {
<mask> height: this.calculateHeight(
<mask> this.state.orientation,
<mask> variables.Inset
<mask> ),
<mask> paddingBottom: this.calculatePadder(
<mask> this.state.orientation,
<mask> variables.Inset
<mask> )
<mask> }
<mask> ]}
<mask> />
<mask> ) : (
<mask> <View ref={c => (this._root = c)} {...this.props} />
<mask> );
<mask> }
<mask> }
<mask>
<mask> Footer.propTypes = {
</s> Fixed SafeAreaView application on Header, Footer and Content components (#2972)
Fixes #2291
- Added SafeAreaView to Header, Content and Footer
- Removed unused state and methods for calculating padding/margins
- Added utility to get style object
- Set background color of SafeAreaView to that of parent component </s> remove {variables.isIphoneX ? (
<View
ref={c => (this._root = c)}
{...this.props}
style={[
style,
{
height: this.calculateHeight(orientation, variables.Inset),
paddingTop: this.calculatePadder(orientation, variables.Inset)
}
]}
/>
) : (
</s> add <SafeAreaView
style={{
backgroundColor: getStyle(style).backgroundColor
}}
> </s> remove )}
</s> add </SafeAreaView> </s> remove ) : (
<KeyboardAwareScrollView
automaticallyAdjustContentInsets={false}
resetScrollToCoords={disableKBDismissScroll ? null : { x: 0, y: 0 }}
keyboardShouldPersistTaps={keyboardShouldPersistTaps || 'handled'}
ref={c => {
this._scrollview = c;
this._root = c;
}}
{...this.props}
contentContainerStyle={[
{ padding: padder ? variables.contentPadding : undefined },
contentContainerStyle
]}
>
{children}
</KeyboardAwareScrollView>
</s> add </s> remove const containerStyle = { flex: 1 };
</s> add const containerStyle = {
flex: 1,
backgroundColor: getStyle(style).backgroundColor
};
</s> remove calculatePadder(mode, inSet) {
const { style } = this.props;
let inset = null;
if (inSet !== undefined) {
inset = inSet;
} else {
inset = variable.Inset;
}
const InsetValues = mode === 'portrait' ? inset.portrait : inset.landscape;
let bottomPadder = null;
if (style[1] !== undefined) {
if (style[1].padding !== undefined || style[1].paddingTop !== undefined) {
bottomPadder =
(style[1].paddingTop || style[1].padding) + InsetValues.bottomInset;
}
} else if (style.padding !== undefined && style.paddingTop !== undefined) {
bottomPadder =
(style.paddingTop || style.padding) + InsetValues.bottomInset;
} else {
bottomPadder = InsetValues.bottomInset;
}
return bottomPadder;
}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"re... | https://github.com/GeekyAnts/NativeBase/commit/3a4965c579c7cb53f9d2621a74b39e0f97cd04fd | src/basic/Footer.js |
<mask> /* eslint-disable no-nested-ternary */
<mask> /* eslint-disable no-unneeded-ternary */
<mask> import { get } from 'lodash';
<mask> import { connectStyle } from 'native-base-shoutem-theme';
<mask> import PropTypes from 'prop-types';
<mask> import React, { Component } from 'react';
<mask> import { View, StatusBar, StyleSheet, ViewPropTypes } from 'react-native';
<mask>
</s> Fixed SafeAreaView application on Header, Footer and Content components (#2972)
Fixes #2291
- Added SafeAreaView to Header, Content and Footer
- Removed unused state and methods for calculating padding/margins
- Added utility to get style object
- Set background color of SafeAreaView to that of parent component </s> remove import { View, StatusBar, StyleSheet, ViewPropTypes } from 'react-native';
</s> add import { View, StatusBar, ViewPropTypes, SafeAreaView } from 'react-native'; </s> remove import { View, ViewPropTypes } from 'react-native';
</s> add import { View, ViewPropTypes, SafeAreaView } from 'react-native'; </s> remove import variable from '../theme/variables/platform';
</s> add | [
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3a4965c579c7cb53f9d2621a74b39e0f97cd04fd | src/basic/Header.js | |
import { View, StatusBar, ViewPropTypes, SafeAreaView } from 'react-native'; | <mask> import { get } from 'lodash';
<mask> import { connectStyle } from 'native-base-shoutem-theme';
<mask> import PropTypes from 'prop-types';
<mask> import React, { Component } from 'react';
<mask> import { View, StatusBar, StyleSheet, ViewPropTypes } from 'react-native';
<mask>
<mask> import mapPropsToStyleNames from '../utils/mapPropsToStyleNames';
<mask> import variable from '../theme/variables/platform';
<mask>
<mask> class Header extends Component {
</s> Fixed SafeAreaView application on Header, Footer and Content components (#2972)
Fixes #2291
- Added SafeAreaView to Header, Content and Footer
- Removed unused state and methods for calculating padding/margins
- Added utility to get style object
- Set background color of SafeAreaView to that of parent component </s> remove import { get } from 'lodash';
</s> add </s> remove import { View, ViewPropTypes } from 'react-native';
</s> add import { View, ViewPropTypes, SafeAreaView } from 'react-native'; </s> remove import variable from '../theme/variables/platform';
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3a4965c579c7cb53f9d2621a74b39e0f97cd04fd | src/basic/Header.js |
import getStyle from '../utils/getStyle'; | <mask> import { View, StatusBar, ViewPropTypes, SafeAreaView } from 'react-native';
<mask>
<mask> import mapPropsToStyleNames from '../utils/mapPropsToStyleNames';
<mask> import variable from '../theme/variables/platform';
<mask>
<mask> class Header extends Component {
<mask> static contextTypes = {
</s> Fixed SafeAreaView application on Header, Footer and Content components (#2972)
Fixes #2291
- Added SafeAreaView to Header, Content and Footer
- Removed unused state and methods for calculating padding/margins
- Added utility to get style object
- Set background color of SafeAreaView to that of parent component </s> remove import { View, StatusBar, StyleSheet, ViewPropTypes } from 'react-native';
</s> add import { View, StatusBar, ViewPropTypes, SafeAreaView } from 'react-native'; </s> remove import { View, ViewPropTypes } from 'react-native';
</s> add import { View, ViewPropTypes, SafeAreaView } from 'react-native'; </s> remove import variable from '../theme/variables/platform';
</s> add | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3a4965c579c7cb53f9d2621a74b39e0f97cd04fd | src/basic/Header.js |
<mask> static contextTypes = {
<mask> theme: PropTypes.object
<mask> };
<mask>
<mask> constructor(props) {
<mask> super(props);
<mask> this.state = {
<mask> orientation: 'portrait'
<mask> };
<mask> }
<mask>
<mask> layoutChange(val) {
<mask> const maxComp = Math.max(variable.deviceWidth, variable.deviceHeight);
<mask>
<mask> if (val.width >= maxComp) this.setState({ orientation: 'landscape' });
<mask> else this.setState({ orientation: 'portrait' });
<mask> }
<mask>
<mask> calculateHeight(mode, inSet) {
<mask> const { style } = this.props;
<mask> let inset = null;
<mask>
<mask> if (inSet !== undefined) {
<mask> inset = inSet;
<mask> } else {
<mask> inset = variable.Inset;
<mask> }
<mask>
<mask> const InsetValues = mode === 'portrait' ? inset.portrait : inset.landscape;
<mask> let oldHeight = null;
<mask>
<mask> if (style.height !== undefined) {
<mask> oldHeight = style.height;
<mask> } else if (style[1]) {
<mask> oldHeight = style[1].height ? style[1].height : style[0].height;
<mask> } else {
<mask> oldHeight = style[0].height;
<mask> }
<mask>
<mask> const height = oldHeight + InsetValues.topInset;
<mask>
<mask> return height;
<mask> }
<mask>
<mask> calculatePadder(mode, inSet) {
<mask> let inset = null;
<mask>
<mask> if (inSet !== undefined) {
<mask> inset = inSet;
<mask> } else {
<mask> inset = variable.Inset;
<mask> }
<mask>
<mask> const InsetValues = mode === 'portrait' ? inset.portrait : inset.landscape;
<mask> let topPadder = null;
<mask> const style = StyleSheet.flatten(this.props.style);
<mask>
<mask> if (style.padding !== undefined || style.paddingTop !== undefined) {
<mask> topPadder =
<mask> (style.paddingTop ? style.paddingTop : get(style, 'padding', 0)) +
<mask> InsetValues.topInset;
<mask> } else {
<mask> topPadder = InsetValues.topInset;
<mask> }
<mask>
<mask> return topPadder;
<mask> }
<mask>
<mask> render() {
<mask> const {
<mask> androidStatusBarColor,
<mask> iosBarStyle,
<mask> style,
</s> Fixed SafeAreaView application on Header, Footer and Content components (#2972)
Fixes #2291
- Added SafeAreaView to Header, Content and Footer
- Removed unused state and methods for calculating padding/margins
- Added utility to get style object
- Set background color of SafeAreaView to that of parent component </s> remove constructor(props) {
super(props);
this.state = {
orientation:
variable.deviceHeight > variable.deviceWidth ? 'portrait' : 'landscape'
};
}
layoutChange(val) {
const maxComp = Math.max(variable.deviceWidth, variable.deviceHeight);
if (val.width >= maxComp) this.setState({ orientation: 'landscape' });
else {
this.setState({ orientation: 'portrait' });
}
}
calculateHeight(mode, inSet) {
const { style } = this.props;
let inset = null;
if (inSet !== undefined) {
inset = inSet;
} else {
inset = variable.Inset;
}
const InsetValues = mode === 'portrait' ? inset.portrait : inset.landscape;
let oldHeight = null;
if (style.height !== undefined) {
oldHeight = style.height;
} else if (style[1]) {
oldHeight = style[1].height || style[0].height;
} else {
oldHeight = style[0].height;
}
const height = oldHeight + InsetValues.bottomInset;
return height;
}
</s> add </s> remove calculatePadder(mode, inSet) {
const { style } = this.props;
let inset = null;
if (inSet !== undefined) {
inset = inSet;
} else {
inset = variable.Inset;
}
const InsetValues = mode === 'portrait' ? inset.portrait : inset.landscape;
let bottomPadder = null;
if (style[1] !== undefined) {
if (style[1].padding !== undefined || style[1].paddingTop !== undefined) {
bottomPadder =
(style[1].paddingTop || style[1].padding) + InsetValues.bottomInset;
}
} else if (style.padding !== undefined && style.paddingTop !== undefined) {
bottomPadder =
(style.paddingTop || style.padding) + InsetValues.bottomInset;
} else {
bottomPadder = InsetValues.bottomInset;
}
return bottomPadder;
}
</s> add </s> remove constructor(props) {
super(props);
this.state = {
orientation: 'portrait'
};
}
layoutChange(val) {
const maxComp = Math.max(variable.deviceWidth, variable.deviceHeight);
if (val.width >= maxComp) this.setState({ orientation: 'landscape' });
else {
this.setState({ orientation: 'portrait' });
}
}
</s> add </s> remove const containerStyle = { flex: 1 };
</s> add const containerStyle = {
flex: 1,
backgroundColor: getStyle(style).backgroundColor
};
</s> remove const variables = this.context.theme
? this.context.theme['@@shoutem.theme/themeStyle'].variables
: variable;
return variables.isIphoneX ? (
<View
ref={c => (this._root = c)}
{...this.props}
onLayout={e => this.layoutChange(e.nativeEvent.layout)}
style={[
style,
{
height: this.calculateHeight(
this.state.orientation,
variables.Inset
),
paddingBottom: this.calculatePadder(
this.state.orientation,
variables.Inset
)
}
]}
/>
) : (
<View ref={c => (this._root = c)} {...this.props} />
</s> add return (
<SafeAreaView
style={{
backgroundColor: getStyle(style).backgroundColor
}}
>
<View ref={c => (this._root = c)} {...this.props} />
</SafeAreaView> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"re... | https://github.com/GeekyAnts/NativeBase/commit/3a4965c579c7cb53f9d2621a74b39e0f97cd04fd | src/basic/Header.js | |
<mask> style,
<mask> transparent,
<mask> translucent
<mask> } = this.props;
<mask> const { orientation } = this.state;
<mask> const variables = this.context.theme
<mask> ? this.context.theme['@@shoutem.theme/themeStyle'].variables
<mask> : variable;
<mask> const platformStyle = variables.platformStyle;
<mask>
</s> Fixed SafeAreaView application on Header, Footer and Content components (#2972)
Fixes #2291
- Added SafeAreaView to Header, Content and Footer
- Removed unused state and methods for calculating padding/margins
- Added utility to get style object
- Set background color of SafeAreaView to that of parent component </s> remove const containerStyle = { flex: 1 };
</s> add const containerStyle = {
flex: 1,
backgroundColor: getStyle(style).backgroundColor
};
</s> remove const variables = this.context.theme
? this.context.theme['@@shoutem.theme/themeStyle'].variables
: variable;
return variables.isIphoneX ? (
<View
ref={c => (this._root = c)}
{...this.props}
onLayout={e => this.layoutChange(e.nativeEvent.layout)}
style={[
style,
{
height: this.calculateHeight(
this.state.orientation,
variables.Inset
),
paddingBottom: this.calculatePadder(
this.state.orientation,
variables.Inset
)
}
]}
/>
) : (
<View ref={c => (this._root = c)} {...this.props} />
</s> add return (
<SafeAreaView
style={{
backgroundColor: getStyle(style).backgroundColor
}}
>
<View ref={c => (this._root = c)} {...this.props} />
</SafeAreaView> </s> remove calculatePadder(mode, inSet) {
const { style } = this.props;
let inset = null;
if (inSet !== undefined) {
inset = inSet;
} else {
inset = variable.Inset;
}
const InsetValues = mode === 'portrait' ? inset.portrait : inset.landscape;
let bottomPadder = null;
if (style[1] !== undefined) {
if (style[1].padding !== undefined || style[1].paddingTop !== undefined) {
bottomPadder =
(style[1].paddingTop || style[1].padding) + InsetValues.bottomInset;
}
} else if (style.padding !== undefined && style.paddingTop !== undefined) {
bottomPadder =
(style.paddingTop || style.padding) + InsetValues.bottomInset;
} else {
bottomPadder = InsetValues.bottomInset;
}
return bottomPadder;
}
</s> add </s> remove <View onLayout={e => this.layoutChange(e.nativeEvent.layout)}>
</s> add <View> </s> remove return variables.isIphoneX ? (
</s> add return ( | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3a4965c579c7cb53f9d2621a74b39e0f97cd04fd | src/basic/Header.js | |
<View> | <mask> : variable;
<mask> const platformStyle = variables.platformStyle;
<mask>
<mask> return (
<mask> <View onLayout={e => this.layoutChange(e.nativeEvent.layout)}>
<mask> <StatusBar
<mask> backgroundColor={
<mask> androidStatusBarColor
<mask> ? androidStatusBarColor
<mask> : variables.statusBarColor
</s> Fixed SafeAreaView application on Header, Footer and Content components (#2972)
Fixes #2291
- Added SafeAreaView to Header, Content and Footer
- Removed unused state and methods for calculating padding/margins
- Added utility to get style object
- Set background color of SafeAreaView to that of parent component </s> remove const variables = this.context.theme
? this.context.theme['@@shoutem.theme/themeStyle'].variables
: variable;
return variables.isIphoneX ? (
<View
ref={c => (this._root = c)}
{...this.props}
onLayout={e => this.layoutChange(e.nativeEvent.layout)}
style={[
style,
{
height: this.calculateHeight(
this.state.orientation,
variables.Inset
),
paddingBottom: this.calculatePadder(
this.state.orientation,
variables.Inset
)
}
]}
/>
) : (
<View ref={c => (this._root = c)} {...this.props} />
</s> add return (
<SafeAreaView
style={{
backgroundColor: getStyle(style).backgroundColor
}}
>
<View ref={c => (this._root = c)} {...this.props} />
</SafeAreaView> </s> remove const { orientation } = this.state;
</s> add </s> remove {variables.isIphoneX ? (
<View
ref={c => (this._root = c)}
{...this.props}
style={[
style,
{
height: this.calculateHeight(orientation, variables.Inset),
paddingTop: this.calculatePadder(orientation, variables.Inset)
}
]}
/>
) : (
</s> add <SafeAreaView
style={{
backgroundColor: getStyle(style).backgroundColor
}}
> </s> remove return variables.isIphoneX ? (
</s> add return ( </s> remove )}
</s> add </SafeAreaView> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3a4965c579c7cb53f9d2621a74b39e0f97cd04fd | src/basic/Header.js |
<SafeAreaView
style={{
backgroundColor: getStyle(style).backgroundColor
}}
> | <mask> : variables.iosStatusbar
<mask> }
<mask> translucent={transparent ? true : translucent}
<mask> />
<mask> {variables.isIphoneX ? (
<mask> <View
<mask> ref={c => (this._root = c)}
<mask> {...this.props}
<mask> style={[
<mask> style,
<mask> {
<mask> height: this.calculateHeight(orientation, variables.Inset),
<mask> paddingTop: this.calculatePadder(orientation, variables.Inset)
<mask> }
<mask> ]}
<mask> />
<mask> ) : (
<mask> <View ref={c => (this._root = c)} {...this.props} />
<mask> )}
<mask> </View>
<mask> );
<mask> }
</s> Fixed SafeAreaView application on Header, Footer and Content components (#2972)
Fixes #2291
- Added SafeAreaView to Header, Content and Footer
- Removed unused state and methods for calculating padding/margins
- Added utility to get style object
- Set background color of SafeAreaView to that of parent component </s> remove )}
</s> add </SafeAreaView> </s> remove const variables = this.context.theme
? this.context.theme['@@shoutem.theme/themeStyle'].variables
: variable;
return variables.isIphoneX ? (
<View
ref={c => (this._root = c)}
{...this.props}
onLayout={e => this.layoutChange(e.nativeEvent.layout)}
style={[
style,
{
height: this.calculateHeight(
this.state.orientation,
variables.Inset
),
paddingBottom: this.calculatePadder(
this.state.orientation,
variables.Inset
)
}
]}
/>
) : (
<View ref={c => (this._root = c)} {...this.props} />
</s> add return (
<SafeAreaView
style={{
backgroundColor: getStyle(style).backgroundColor
}}
>
<View ref={c => (this._root = c)} {...this.props} />
</SafeAreaView> </s> remove ) : (
<KeyboardAwareScrollView
automaticallyAdjustContentInsets={false}
resetScrollToCoords={disableKBDismissScroll ? null : { x: 0, y: 0 }}
keyboardShouldPersistTaps={keyboardShouldPersistTaps || 'handled'}
ref={c => {
this._scrollview = c;
this._root = c;
}}
{...this.props}
contentContainerStyle={[
{ padding: padder ? variables.contentPadding : undefined },
contentContainerStyle
]}
>
{children}
</KeyboardAwareScrollView>
</s> add </s> remove <View onLayout={e => this.layoutChange(e.nativeEvent.layout)}>
</s> add <View> </s> remove style={style}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3a4965c579c7cb53f9d2621a74b39e0f97cd04fd | src/basic/Header.js |
</SafeAreaView> | <mask> ]}
<mask> />
<mask> ) : (
<mask> <View ref={c => (this._root = c)} {...this.props} />
<mask> )}
<mask> </View>
<mask> );
<mask> }
<mask> }
<mask>
</s> Fixed SafeAreaView application on Header, Footer and Content components (#2972)
Fixes #2291
- Added SafeAreaView to Header, Content and Footer
- Removed unused state and methods for calculating padding/margins
- Added utility to get style object
- Set background color of SafeAreaView to that of parent component </s> remove {variables.isIphoneX ? (
<View
ref={c => (this._root = c)}
{...this.props}
style={[
style,
{
height: this.calculateHeight(orientation, variables.Inset),
paddingTop: this.calculatePadder(orientation, variables.Inset)
}
]}
/>
) : (
</s> add <SafeAreaView
style={{
backgroundColor: getStyle(style).backgroundColor
}}
> </s> remove const variables = this.context.theme
? this.context.theme['@@shoutem.theme/themeStyle'].variables
: variable;
return variables.isIphoneX ? (
<View
ref={c => (this._root = c)}
{...this.props}
onLayout={e => this.layoutChange(e.nativeEvent.layout)}
style={[
style,
{
height: this.calculateHeight(
this.state.orientation,
variables.Inset
),
paddingBottom: this.calculatePadder(
this.state.orientation,
variables.Inset
)
}
]}
/>
) : (
<View ref={c => (this._root = c)} {...this.props} />
</s> add return (
<SafeAreaView
style={{
backgroundColor: getStyle(style).backgroundColor
}}
>
<View ref={c => (this._root = c)} {...this.props} />
</SafeAreaView> </s> remove ) : (
<KeyboardAwareScrollView
automaticallyAdjustContentInsets={false}
resetScrollToCoords={disableKBDismissScroll ? null : { x: 0, y: 0 }}
keyboardShouldPersistTaps={keyboardShouldPersistTaps || 'handled'}
ref={c => {
this._scrollview = c;
this._root = c;
}}
{...this.props}
contentContainerStyle={[
{ padding: padder ? variables.contentPadding : undefined },
contentContainerStyle
]}
>
{children}
</KeyboardAwareScrollView>
</s> add </s> remove <View onLayout={e => this.layoutChange(e.nativeEvent.layout)}>
</s> add <View> </s> remove style={style}
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3a4965c579c7cb53f9d2621a74b39e0f97cd04fd | src/basic/Header.js |
<mask> import styled from 'styled-components/native';
<mask> import { Box, Image, Text } from '../../primitives';
<mask> import { useThemeProps } from '../../../hooks';
<mask> import type { IAvatarProps } from './types';
<mask> import AvatarBadge from './Badge';
<mask> import AvatarGroup from './Group';
<mask>
<mask> const initials = (name: string) => {
<mask> const [firstName, lastName] = name.split(' ');
<mask> return firstName && lastName
<mask> ? `${firstName.charAt(0)}${lastName.charAt(0)}`
</s> Fixes for cyclic dependency in Avatar </s> remove Avatar.Badge = React.memo(AvatarBadge);
Avatar.Group = React.memo(AvatarGroup);
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3a6730aba250421e46e815aafbc16d8944e61685 | src/components/composites/Avatar/Avatar.tsx | |
<mask> {children}
<mask> </StyledAvatar>
<mask> );
<mask> };
<mask> Avatar.Badge = React.memo(AvatarBadge);
<mask> Avatar.Group = React.memo(AvatarGroup);
<mask> export default Avatar;
</s> Fixes for cyclic dependency in Avatar </s> remove import AvatarBadge from './Badge';
import AvatarGroup from './Group';
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3a6730aba250421e46e815aafbc16d8944e61685 | src/components/composites/Avatar/Avatar.tsx | |
// @ts-ignore
Avatar.Badge = AvatarBadge;
// @ts-ignore
Avatar.Group = AvatarGroup;
export { Avatar }; | <mask> import Avatar from './Avatar';
<mask> import AvatarBadge from './Badge';
<mask> import AvatarGroup from './Group';
<mask> export type { IAvatarProps, IAvatarBadgeProps } from './types';
</s> Fixes for cyclic dependency in Avatar </s> remove import AvatarBadge from './Badge';
import AvatarGroup from './Group';
</s> add </s> remove Avatar.Badge = React.memo(AvatarBadge);
Avatar.Group = React.memo(AvatarGroup);
</s> add | [
"keep",
"keep",
"keep",
"add"
] | https://github.com/GeekyAnts/NativeBase/commit/3a6730aba250421e46e815aafbc16d8944e61685 | src/components/composites/Avatar/index.tsx |
useColorModeValue, | <mask> Center,
<mask> HStack,
<mask> Stack,
<mask> } from 'native-base';
<mask> export const Composition = () => {
<mask> return (
<mask> <Box width={72} bg={useColorModeValue('gray.50', 'gray.700')} shadow={4}>
<mask> <Box>
</s> fix: box example made presentable </s> remove <Box width={72} bg="gray.50" shadow={4}>
</s> add <Box width={72} bg={useColorModeValue('gray.50', 'gray.700')} shadow={4}> </s> remove <Icon name="ios-chatbubbles" type="Ionicons" color="gray.500" />
</s> add <Icon
name="ios-chatbubbles"
type="Ionicons"
color="gray.500"
size="sm"
/> </s> remove <Icon name="access-time" color="gray.500" />
</s> add <Icon name="access-time" color="gray.500" size="sm" /> </s> remove <Heading size="md">Life in the Garden City</Heading>
<Heading size="sm" color="red.500" fontWeight="500">
</s> add <Heading size="sm">Life in the Garden City</Heading>
<Heading
size="xs"
color={useColorModeValue('red.500', 'red.300')}
fontWeight="500"
> </s> remove <Stack p={4} space={3}>
</s> add <Stack p={4} space={4}> | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3ac7d711ebdf10413b6d8b7aa2b93ef8b15f584c | example/storybook/stories/components/primitives/Box/composition.tsx |
<Box width={72} bg={useColorModeValue('gray.50', 'gray.700')} shadow={4}> | <mask> Stack,
<mask> } from 'native-base';
<mask> export const Composition = () => {
<mask> return (
<mask> <Box width={72} bg="gray.50" shadow={4}>
<mask> <Box>
<mask> <AspectRatio ratio={16 / 9}>
<mask> <Image
<mask> source={{
<mask> uri:
</s> fix: box example made presentable </s> remove <Icon name="ios-chatbubbles" type="Ionicons" color="gray.500" />
</s> add <Icon
name="ios-chatbubbles"
type="Ionicons"
color="gray.500"
size="sm"
/> </s> remove <Icon name="access-time" color="gray.500" />
</s> add <Icon name="access-time" color="gray.500" size="sm" /> </s> remove <Heading size="md">Life in the Garden City</Heading>
<Heading size="sm" color="red.500" fontWeight="500">
</s> add <Heading size="sm">Life in the Garden City</Heading>
<Heading
size="xs"
color={useColorModeValue('red.500', 'red.300')}
fontWeight="500"
> </s> remove <Stack p={4} space={3}>
</s> add <Stack p={4} space={4}> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3ac7d711ebdf10413b6d8b7aa2b93ef8b15f584c | example/storybook/stories/components/primitives/Box/composition.tsx |
<Stack p={4} space={4}> | <mask> >
<mask> 27 MAR
<mask> </Center>
<mask> </Box>
<mask> <Stack p={4} space={3}>
<mask> <Stack space={2}>
<mask> <Heading size="md">Life in the Garden City</Heading>
<mask> <Heading size="sm" color="red.500" fontWeight="500">
<mask> The Silicon Valley of India.
<mask> </Heading>
</s> fix: box example made presentable </s> remove <Heading size="md">Life in the Garden City</Heading>
<Heading size="sm" color="red.500" fontWeight="500">
</s> add <Heading size="sm">Life in the Garden City</Heading>
<Heading
size="xs"
color={useColorModeValue('red.500', 'red.300')}
fontWeight="500"
> </s> remove <Icon name="ios-chatbubbles" type="Ionicons" color="gray.500" />
</s> add <Icon
name="ios-chatbubbles"
type="Ionicons"
color="gray.500"
size="sm"
/> </s> remove <Icon name="access-time" color="gray.500" />
</s> add <Icon name="access-time" color="gray.500" size="sm" /> </s> remove <Box width={72} bg="gray.50" shadow={4}>
</s> add <Box width={72} bg={useColorModeValue('gray.50', 'gray.700')} shadow={4}> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3ac7d711ebdf10413b6d8b7aa2b93ef8b15f584c | example/storybook/stories/components/primitives/Box/composition.tsx |
<Heading size="sm">Life in the Garden City</Heading>
<Heading
size="xs"
color={useColorModeValue('red.500', 'red.300')}
fontWeight="500"
> | <mask> </Center>
<mask> </Box>
<mask> <Stack p={4} space={3}>
<mask> <Stack space={2}>
<mask> <Heading size="md">Life in the Garden City</Heading>
<mask> <Heading size="sm" color="red.500" fontWeight="500">
<mask> The Silicon Valley of India.
<mask> </Heading>
<mask> </Stack>
<mask> <Text lineHeight={6} fontWeight={400}>
<mask> Bengaluru (also called Bangalore) is the center of India's high-tech
</s> fix: box example made presentable </s> remove <Stack p={4} space={3}>
</s> add <Stack p={4} space={4}> </s> remove <Icon name="access-time" color="gray.500" />
</s> add <Icon name="access-time" color="gray.500" size="sm" /> </s> remove <Icon name="ios-chatbubbles" type="Ionicons" color="gray.500" />
</s> add <Icon
name="ios-chatbubbles"
type="Ionicons"
color="gray.500"
size="sm"
/> </s> remove <Box width={72} bg="gray.50" shadow={4}>
</s> add <Box width={72} bg={useColorModeValue('gray.50', 'gray.700')} shadow={4}> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3ac7d711ebdf10413b6d8b7aa2b93ef8b15f584c | example/storybook/stories/components/primitives/Box/composition.tsx |
<Icon name="access-time" color="gray.500" size="sm" /> | <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 name="access-time" color="gray.500" />
<mask> <Text ml={1} color="gray.500" fontWeight="500">
<mask> 6 mins ago
<mask> </Text>
<mask> </HStack>
<mask> <HStack alignItems="center">
</s> fix: box example made presentable </s> remove <Icon name="ios-chatbubbles" type="Ionicons" color="gray.500" />
</s> add <Icon
name="ios-chatbubbles"
type="Ionicons"
color="gray.500"
size="sm"
/> </s> remove <Heading size="md">Life in the Garden City</Heading>
<Heading size="sm" color="red.500" fontWeight="500">
</s> add <Heading size="sm">Life in the Garden City</Heading>
<Heading
size="xs"
color={useColorModeValue('red.500', 'red.300')}
fontWeight="500"
> </s> remove <Stack p={4} space={3}>
</s> add <Stack p={4} space={4}> </s> remove <Box width={72} bg="gray.50" shadow={4}>
</s> add <Box width={72} bg={useColorModeValue('gray.50', 'gray.700')} shadow={4}> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3ac7d711ebdf10413b6d8b7aa2b93ef8b15f584c | example/storybook/stories/components/primitives/Box/composition.tsx |
<Icon
name="ios-chatbubbles"
type="Ionicons"
color="gray.500"
size="sm"
/> | <mask> 6 mins ago
<mask> </Text>
<mask> </HStack>
<mask> <HStack alignItems="center">
<mask> <Icon name="ios-chatbubbles" type="Ionicons" color="gray.500" />
<mask> <Text ml={1} color="gray.500" fontWeight="500">
<mask> 39 comments
<mask> </Text>
<mask> </HStack>
<mask> </HStack>
</s> fix: box example made presentable </s> remove <Icon name="access-time" color="gray.500" />
</s> add <Icon name="access-time" color="gray.500" size="sm" /> </s> remove <Stack p={4} space={3}>
</s> add <Stack p={4} space={4}> </s> remove <Heading size="md">Life in the Garden City</Heading>
<Heading size="sm" color="red.500" fontWeight="500">
</s> add <Heading size="sm">Life in the Garden City</Heading>
<Heading
size="xs"
color={useColorModeValue('red.500', 'red.300')}
fontWeight="500"
> </s> remove <Box width={72} bg="gray.50" shadow={4}>
</s> add <Box width={72} bg={useColorModeValue('gray.50', 'gray.700')} shadow={4}> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3ac7d711ebdf10413b6d8b7aa2b93ef8b15f584c | example/storybook/stories/components/primitives/Box/composition.tsx |
['success', 'green', 'error', 'red', 'warning'],
'error'
)}
colorScheme={select(
'colorScheme', | <mask> status={select(
<mask> 'status',
<mask> [
<mask> 'success',
<mask> 'green',
<mask> 'error',
<mask> 'red',
<mask> 'warning',
</s> fix: alert to material design changes </s> remove <Box
minW="100%"
maxW="100%"
position="relative"
flexDirection="row"
alignItems="center"
justifyContent="flex-start"
flexWrap="wrap"
_text={_text}
{...newProps}
ref={ref}
>
</s> add <Box _text={_text} {...newProps} ref={ref}> </s> remove status = getColorScheme(props, status);
</s> add colorScheme = getColorScheme(props, colorScheme); </s> remove let { theme, status, variant } = props;
</s> add let { theme, colorScheme, variant } = props; </s> remove <Text mr={2} color={textColor} {...newProps} {..._text}>
</s> add <Text color={textColor} {...newProps} {..._text}> | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | example/storybook/stories/components/composites/Alert/knobEnabled.tsx |
<CloseButton position="absolute" right="8px" size="xs" /> | <mask> >
<mask> <Alert.Icon />
<mask> <Alert.Title>Error Alert</Alert.Title>
<mask> <Alert.Description>description goes here </Alert.Description>
<mask> <CloseButton position="absolute" right="8px" />
<mask> </Alert>
<mask> );
<mask> }
</s> fix: alert to material design changes </s> remove <Alert.Title>Error Alert</Alert.Title>
</s> add <Alert.Title>Alert Title</Alert.Title> </s> remove <Alert status="info" variant={key}>
</s> add <Alert status="info" colorScheme="info" variant={key}> </s> remove <Alert status="warning" variant={key}>
</s> add <Alert status="warning" colorScheme="warning" variant={key}> </s> remove <Alert status="success" variant={key}>
</s> add <Alert status="success" colorScheme="success" variant={key}> </s> remove <Alert status="error" variant={key} key={key}>
</s> add <Alert status="error" colorScheme="error" variant={key} key={key}> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | example/storybook/stories/components/composites/Alert/knobEnabled.tsx |
<Alert status="error" colorScheme="error" variant={key} key={key}> | <mask> return (
<mask> <HStack>
<mask> {['subtle', 'solid', 'outline'].map((key: any) => (
<mask> <Stack space={3} mx={3}>
<mask> <Alert status="error" variant={key} key={key}>
<mask> <Alert.Icon />
<mask> <Alert.Title>This is an error alert</Alert.Title>
<mask> </Alert>
<mask> <Alert status="warning" variant={key}>
<mask> <Alert.Icon />
</s> fix: alert to material design changes </s> remove <Alert status="warning" variant={key}>
</s> add <Alert status="warning" colorScheme="warning" variant={key}> </s> remove <Alert status="info" variant={key}>
</s> add <Alert status="info" colorScheme="info" variant={key}> </s> remove <Alert status="success" variant={key}>
</s> add <Alert status="success" colorScheme="success" variant={key}> </s> remove <Alert.Title>Error Alert</Alert.Title>
</s> add <Alert.Title>Alert Title</Alert.Title> </s> remove <CloseButton position="absolute" right="8px" />
</s> add <CloseButton position="absolute" right="8px" size="xs" /> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | example/storybook/stories/components/composites/Alert/status.tsx |
<Alert status="warning" colorScheme="warning" variant={key}> | <mask> <Alert status="error" variant={key} key={key}>
<mask> <Alert.Icon />
<mask> <Alert.Title>This is an error alert</Alert.Title>
<mask> </Alert>
<mask> <Alert status="warning" variant={key}>
<mask> <Alert.Icon />
<mask> <Alert.Title>This is a warning alert</Alert.Title>
<mask> </Alert>
<mask> <Alert status="info" variant={key}>
<mask> <Alert.Icon />
</s> fix: alert to material design changes </s> remove <Alert status="info" variant={key}>
</s> add <Alert status="info" colorScheme="info" variant={key}> </s> remove <Alert status="success" variant={key}>
</s> add <Alert status="success" colorScheme="success" variant={key}> </s> remove <Alert status="error" variant={key} key={key}>
</s> add <Alert status="error" colorScheme="error" variant={key} key={key}> </s> remove <CloseButton position="absolute" right="8px" />
</s> add <CloseButton position="absolute" right="8px" size="xs" /> </s> remove <Alert.Title>Error Alert</Alert.Title>
</s> add <Alert.Title>Alert Title</Alert.Title> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | example/storybook/stories/components/composites/Alert/status.tsx |
<Alert status="info" colorScheme="info" variant={key}> | <mask> <Alert status="warning" variant={key}>
<mask> <Alert.Icon />
<mask> <Alert.Title>This is a warning alert</Alert.Title>
<mask> </Alert>
<mask> <Alert status="info" variant={key}>
<mask> <Alert.Icon />
<mask> <Alert.Title>This is an info alert</Alert.Title>
<mask> </Alert>
<mask> <Alert status="success" variant={key}>
<mask> <Alert.Icon />
</s> fix: alert to material design changes </s> remove <Alert status="success" variant={key}>
</s> add <Alert status="success" colorScheme="success" variant={key}> </s> remove <Alert status="warning" variant={key}>
</s> add <Alert status="warning" colorScheme="warning" variant={key}> </s> remove <Alert status="error" variant={key} key={key}>
</s> add <Alert status="error" colorScheme="error" variant={key} key={key}> </s> remove <CloseButton position="absolute" right="8px" />
</s> add <CloseButton position="absolute" right="8px" size="xs" /> </s> remove <Alert.Title>Error Alert</Alert.Title>
</s> add <Alert.Title>Alert Title</Alert.Title> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | example/storybook/stories/components/composites/Alert/status.tsx |
<Alert status="success" colorScheme="success" variant={key}> | <mask> <Alert status="info" variant={key}>
<mask> <Alert.Icon />
<mask> <Alert.Title>This is an info alert</Alert.Title>
<mask> </Alert>
<mask> <Alert status="success" variant={key}>
<mask> <Alert.Icon />
<mask> <Alert.Title>This is a success alert</Alert.Title>
<mask> </Alert>
<mask> </Stack>
<mask> ))}
</s> fix: alert to material design changes </s> remove <Alert status="info" variant={key}>
</s> add <Alert status="info" colorScheme="info" variant={key}> </s> remove <Alert status="warning" variant={key}>
</s> add <Alert status="warning" colorScheme="warning" variant={key}> </s> remove <Alert status="error" variant={key} key={key}>
</s> add <Alert status="error" colorScheme="error" variant={key} key={key}> </s> remove <CloseButton position="absolute" right="8px" />
</s> add <CloseButton position="absolute" right="8px" size="xs" /> </s> remove <Alert.Title>Error Alert</Alert.Title>
</s> add <Alert.Title>Alert Title</Alert.Title> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | example/storybook/stories/components/composites/Alert/status.tsx |
<Alert.Title>Alert Title</Alert.Title> | <mask> return (
<mask> <Box mx={3}>
<mask> <Alert>
<mask> <Alert.Icon />
<mask> <Alert.Title>Error Alert</Alert.Title>
<mask> <Alert.Description>description goes here</Alert.Description>
<mask> </Alert>
<mask> </Box>
<mask> );
<mask> }
</s> fix: alert to material design changes </s> remove <CloseButton position="absolute" right="8px" />
</s> add <CloseButton position="absolute" right="8px" size="xs" /> </s> remove <Alert status="error" variant={key} key={key}>
</s> add <Alert status="error" colorScheme="error" variant={key} key={key}> </s> remove <Icon
name={getIconName()}
type="MaterialIcons"
size={8}
mr={4}
color={iconColor}
{...newProps}
/>
</s> add <Icon name={getIconName()} color={iconColor} {...newProps} /> </s> remove <Box
minW="100%"
maxW="100%"
position="relative"
flexDirection="row"
alignItems="center"
justifyContent="flex-start"
flexWrap="wrap"
_text={_text}
{...newProps}
ref={ref}
>
</s> add <Box _text={_text} {...newProps} ref={ref}> </s> remove <Alert status="info" variant={key}>
</s> add <Alert status="info" colorScheme="info" variant={key}> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | example/storybook/stories/components/composites/Alert/usage.tsx |
const {
status,
variant,
iconColor,
textColor,
colorScheme,
...newProps
} = useThemeProps('Alert', props); | <mask> const Alert = (
<mask> { children, _text, action, ...props }: IAlertProps,
<mask> ref: any
<mask> ) => {
<mask> const { status, variant, iconColor, textColor, ...newProps } = useThemeProps(
<mask> 'Alert',
<mask> props
<mask> );
<mask>
<mask> return (
<mask> <AlertContext.Provider
<mask> value={{
<mask> status,
</s> fix: alert to material design changes </s> remove <Text mr={2} color={textColor} {...newProps} {..._text}>
</s> add <Text color={textColor} {...newProps} {..._text}> </s> remove const newProps = omitUndefined(props);
</s> add let newProps = useThemeProps('AlertIcon', props);
newProps = omitUndefined(newProps); </s> remove let { status, theme } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme, theme } = props;
colorScheme = getColorScheme(props, colorScheme); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/components/composites/Alert/Alert.tsx |
colorScheme, | <mask> status,
<mask> variant,
<mask> iconColor,
<mask> textColor,
<mask> }}
<mask> >
<mask> <Box _text={_text} {...newProps} ref={ref}>
<mask> {children}
</s> fix: alert to material design changes </s> remove <Box
minW="100%"
maxW="100%"
position="relative"
flexDirection="row"
alignItems="center"
justifyContent="flex-start"
flexWrap="wrap"
_text={_text}
{...newProps}
ref={ref}
>
</s> add <Box _text={_text} {...newProps} ref={ref}> </s> remove const { status, variant, iconColor, textColor, ...newProps } = useThemeProps(
'Alert',
props
);
</s> add const {
status,
variant,
iconColor,
textColor,
colorScheme,
...newProps
} = useThemeProps('Alert', props); </s> remove <Icon
name={getIconName()}
type="MaterialIcons"
size={8}
mr={4}
color={iconColor}
{...newProps}
/>
</s> add <Icon name={getIconName()} color={iconColor} {...newProps} /> </s> remove <Text mr={2} color={textColor} {...newProps} {..._text}>
</s> add <Text color={textColor} {...newProps} {..._text}> </s> remove <CloseButton position="absolute" right="8px" />
</s> add <CloseButton position="absolute" right="8px" size="xs" /> | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/components/composites/Alert/Alert.tsx |
<Box _text={_text} {...newProps} ref={ref}> | <mask> iconColor,
<mask> textColor,
<mask> }}
<mask> >
<mask> <Box
<mask> minW="100%"
<mask> maxW="100%"
<mask> position="relative"
<mask> flexDirection="row"
<mask> alignItems="center"
<mask> justifyContent="flex-start"
<mask> flexWrap="wrap"
<mask> _text={_text}
<mask> {...newProps}
<mask> ref={ref}
<mask> >
<mask> {children}
<mask> {action ? <Box mr={0}>{action}</Box> : null}
<mask> </Box>
<mask> </AlertContext.Provider>
<mask> );
</s> fix: alert to material design changes </s> remove <Icon
name={getIconName()}
type="MaterialIcons"
size={8}
mr={4}
color={iconColor}
{...newProps}
/>
</s> add <Icon name={getIconName()} color={iconColor} {...newProps} /> </s> remove <Alert.Title>Error Alert</Alert.Title>
</s> add <Alert.Title>Alert Title</Alert.Title> </s> remove <CloseButton position="absolute" right="8px" />
</s> add <CloseButton position="absolute" right="8px" size="xs" /> </s> remove const { status, variant, iconColor, textColor, ...newProps } = useThemeProps(
'Alert',
props
);
</s> add const {
status,
variant,
iconColor,
textColor,
colorScheme,
...newProps
} = useThemeProps('Alert', props); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/components/composites/Alert/Alert.tsx |
import { useThemeProps } from '../../../hooks'; | <mask> import React from 'react';
<mask> import { Box, Icon } from '../../primitives';
<mask> import type { IAlertContext } from './index';
<mask> import { AlertContext } from './Context';
<mask> import { omitUndefined } from '../../../theme/tools/utils';
<mask>
<mask> const AlertIcon = ({ children, ...props }: any) => {
<mask> let newProps = useThemeProps('AlertIcon', props);
</s> fix: alert to material design changes </s> remove const newProps = omitUndefined(props);
</s> add let newProps = useThemeProps('AlertIcon', props);
newProps = omitUndefined(newProps); </s> remove import { Alert, AlertDescription, AlertTitle } from './alert';
</s> add import { Alert, AlertDescription, AlertTitle, AlertIcon } from './alert'; </s> remove let { theme, status, variant } = props;
</s> add let { theme, colorScheme, variant } = props; </s> remove <Text mr={2} color={textColor} {...newProps} {..._text}>
</s> add <Text color={textColor} {...newProps} {..._text}> </s> remove const { status, variant, iconColor, textColor, ...newProps } = useThemeProps(
'Alert',
props
);
</s> add const {
status,
variant,
iconColor,
textColor,
colorScheme,
...newProps
} = useThemeProps('Alert', props); | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/components/composites/Alert/AlertIcon.tsx |
let newProps = useThemeProps('AlertIcon', props);
newProps = omitUndefined(newProps); | <mask> import { AlertContext } from './Context';
<mask> import { omitUndefined } from '../../../theme/tools/utils';
<mask>
<mask> const AlertIcon = ({ children, ...props }: any) => {
<mask> const newProps = omitUndefined(props);
<mask> const { status, iconColor }: IAlertContext = React.useContext(AlertContext);
<mask> const getIconName = () => {
<mask> switch (status) {
<mask> case 'error':
<mask> return 'error';
</s> fix: alert to material design changes </s> remove <Text mr={2} color={textColor} {...newProps} {..._text}>
</s> add <Text color={textColor} {...newProps} {..._text}> </s> remove import { Alert, AlertDescription, AlertTitle } from './alert';
</s> add import { Alert, AlertDescription, AlertTitle, AlertIcon } from './alert'; </s> remove const { status, variant, iconColor, textColor, ...newProps } = useThemeProps(
'Alert',
props
);
</s> add const {
status,
variant,
iconColor,
textColor,
colorScheme,
...newProps
} = useThemeProps('Alert', props); </s> remove let { theme, status, variant } = props;
</s> add let { theme, colorScheme, variant } = props; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/components/composites/Alert/AlertIcon.tsx |
<Icon name={getIconName()} color={iconColor} {...newProps} /> | <mask> // TODO: Refactor this and move alignSelf to Icon component.
<mask> return (
<mask> <Box alignSelf="center">
<mask> {children || (
<mask> <Icon
<mask> name={getIconName()}
<mask> type="MaterialIcons"
<mask> size={8}
<mask> mr={4}
<mask> color={iconColor}
<mask> {...newProps}
<mask> />
<mask> )}
<mask> </Box>
<mask> );
<mask> };
<mask> export default React.memo(AlertIcon);
</s> fix: alert to material design changes </s> remove <Alert.Title>Error Alert</Alert.Title>
</s> add <Alert.Title>Alert Title</Alert.Title> </s> remove <Text mr={2} color={textColor} {...newProps} {..._text}>
</s> add <Text color={textColor} {...newProps} {..._text}> </s> remove <Box
minW="100%"
maxW="100%"
position="relative"
flexDirection="row"
alignItems="center"
justifyContent="flex-start"
flexWrap="wrap"
_text={_text}
{...newProps}
ref={ref}
>
</s> add <Box _text={_text} {...newProps} ref={ref}> </s> remove <Alert status="error" variant={key} key={key}>
</s> add <Alert status="error" colorScheme="error" variant={key} key={key}> </s> remove const { status, variant, iconColor, textColor, ...newProps } = useThemeProps(
'Alert',
props
);
</s> add const {
status,
variant,
iconColor,
textColor,
colorScheme,
...newProps
} = useThemeProps('Alert', props); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/components/composites/Alert/AlertIcon.tsx |
<Text color={textColor} {...newProps} {..._text}> | <mask> const AlertTitle = ({ children, _text, ...props }: { _text?: any } & any) => {
<mask> const newProps = useThemeProps('AlertTitle', props);
<mask> const { textColor }: IAlertContext = React.useContext(AlertContext);
<mask> return (
<mask> <Text mr={2} color={textColor} {...newProps} {..._text}>
<mask> {children}
<mask> </Text>
<mask> );
<mask> };
<mask> export default React.memo(AlertTitle);
</s> fix: alert to material design changes </s> remove const newProps = omitUndefined(props);
</s> add let newProps = useThemeProps('AlertIcon', props);
newProps = omitUndefined(newProps); </s> remove const { status, variant, iconColor, textColor, ...newProps } = useThemeProps(
'Alert',
props
);
</s> add const {
status,
variant,
iconColor,
textColor,
colorScheme,
...newProps
} = useThemeProps('Alert', props); </s> remove <Icon
name={getIconName()}
type="MaterialIcons"
size={8}
mr={4}
color={iconColor}
{...newProps}
/>
</s> add <Icon name={getIconName()} color={iconColor} {...newProps} /> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/components/composites/Alert/AlertTitle.tsx |
colorScheme?: string; | <mask> style?: any;
<mask> status?: 'info' | 'warning' | 'success' | 'error' | string;
<mask> children?: JSX.Element | JSX.Element[] | any;
<mask> variant?:
<mask> | 'subtle'
<mask> | 'solid'
<mask> | 'left-accent'
</s> fix: alert to material design changes </s> remove `${status}.500`,
</s> add `${colorScheme}.500`, </s> remove ? getColor(theme, `${status}.400`, status)
: getColor(theme, `${status}.100`, status);
</s> add ? getColor(theme, `${colorScheme}.400`, colorScheme)
: getColor(theme, `${colorScheme}.100`, colorScheme); </s> remove status = getColorScheme(props, status);
</s> add colorScheme = getColorScheme(props, colorScheme); </s> remove let { theme, status, variant } = props;
</s> add let { theme, colorScheme, variant } = props; | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/components/composites/Alert/types.tsx |
let { theme, colorScheme, variant } = props; | <mask> import { mode, getColor, getColorScheme, transparentize } from '../tools';
<mask>
<mask> function getBg(props: Record<string, any>) {
<mask> let { theme, status, variant } = props;
<mask>
<mask> status = getColorScheme(props, status);
<mask> const lightBg =
<mask> variant === 'solid'
<mask> ? getColor(theme, `${status}.400`, status)
</s> fix: alert to material design changes </s> remove status = getColorScheme(props, status);
</s> add colorScheme = getColorScheme(props, colorScheme); </s> remove ? getColor(theme, `${status}.400`, status)
: getColor(theme, `${status}.100`, status);
</s> add ? getColor(theme, `${colorScheme}.400`, colorScheme)
: getColor(theme, `${colorScheme}.100`, colorScheme); </s> remove `${status}.500`,
</s> add `${colorScheme}.500`, </s> remove const newProps = omitUndefined(props);
</s> add let newProps = useThemeProps('AlertIcon', props);
newProps = omitUndefined(newProps); | [
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/theme/components/alert.ts |
colorScheme = getColorScheme(props, colorScheme); | <mask>
<mask> function getBg(props: Record<string, any>) {
<mask> let { theme, status, variant } = props;
<mask>
<mask> status = getColorScheme(props, status);
<mask> const lightBg =
<mask> variant === 'solid'
<mask> ? getColor(theme, `${status}.400`, status)
<mask> : getColor(theme, `${status}.100`, status);
<mask> const darkBg = transparentize(
</s> fix: alert to material design changes </s> remove let { theme, status, variant } = props;
</s> add let { theme, colorScheme, variant } = props; </s> remove ? getColor(theme, `${status}.400`, status)
: getColor(theme, `${status}.100`, status);
</s> add ? getColor(theme, `${colorScheme}.400`, colorScheme)
: getColor(theme, `${colorScheme}.100`, colorScheme); </s> remove `${status}.500`,
</s> add `${colorScheme}.500`, </s> remove borderColor: mode(`${status}.600`, `${status}.500`)(props),
iconColor: mode(`${status}.500`, `${status}.500`)(props),
textColor: getColor(theme, `${status}.700`, status),
</s> add borderColor: mode(`${colorScheme}.600`, `${colorScheme}.500`)(props),
iconColor: mode(`${colorScheme}.500`, `${colorScheme}.500`)(props),
textColor: getColor(theme, `${colorScheme}.700`, colorScheme), </s> remove let { status, theme } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme, theme } = props;
colorScheme = getColorScheme(props, colorScheme); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/theme/components/alert.ts |
? getColor(theme, `${colorScheme}.400`, colorScheme)
: getColor(theme, `${colorScheme}.100`, colorScheme); | <mask>
<mask> status = getColorScheme(props, status);
<mask> const lightBg =
<mask> variant === 'solid'
<mask> ? getColor(theme, `${status}.400`, status)
<mask> : getColor(theme, `${status}.100`, status);
<mask> const darkBg = transparentize(
<mask> `${status}.500`,
<mask> variant === 'solid' ? 0.8 : 0.5
<mask> )(theme);
<mask> return mode(lightBg, darkBg)(props);
</s> fix: alert to material design changes </s> remove `${status}.500`,
</s> add `${colorScheme}.500`, </s> remove status = getColorScheme(props, status);
</s> add colorScheme = getColorScheme(props, colorScheme); </s> remove let { theme, status, variant } = props;
</s> add let { theme, colorScheme, variant } = props; </s> remove let { status, theme } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme, theme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove iconColor: mode(`${status}.500`, `${status}.200`)(props),
</s> add iconColor: mode(`${colorScheme}.500`, `${colorScheme}.200`)(props), | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/theme/components/alert.ts |
`${colorScheme}.500`, | <mask> variant === 'solid'
<mask> ? getColor(theme, `${status}.400`, status)
<mask> : getColor(theme, `${status}.100`, status);
<mask> const darkBg = transparentize(
<mask> `${status}.500`,
<mask> variant === 'solid' ? 0.8 : 0.5
<mask> )(theme);
<mask> return mode(lightBg, darkBg)(props);
<mask> }
<mask>
</s> fix: alert to material design changes </s> remove ? getColor(theme, `${status}.400`, status)
: getColor(theme, `${status}.100`, status);
</s> add ? getColor(theme, `${colorScheme}.400`, colorScheme)
: getColor(theme, `${colorScheme}.100`, colorScheme); </s> remove status = getColorScheme(props, status);
</s> add colorScheme = getColorScheme(props, colorScheme); </s> remove let { theme, status, variant } = props;
</s> add let { theme, colorScheme, variant } = props; </s> remove let { status, theme } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme, theme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove <Box
minW="100%"
maxW="100%"
position="relative"
flexDirection="row"
alignItems="center"
justifyContent="flex-start"
flexWrap="wrap"
_text={_text}
{...newProps}
ref={ref}
>
</s> add <Box _text={_text} {...newProps} ref={ref}> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/theme/components/alert.ts |
let { colorScheme, theme } = props;
colorScheme = getColorScheme(props, colorScheme); | <mask> return mode(lightBg, darkBg)(props);
<mask> }
<mask>
<mask> const variantSubtle = (props: Record<string, any>) => {
<mask> let { status, theme } = props;
<mask> status = getColorScheme(props, status);
<mask> return {
<mask> bg: getBg(props),
<mask> iconColor: mode(`${status}.500`, `${status}.200`)(props),
<mask> textColor: mode(
<mask> getColor(theme, `${status}.600`, status),
</s> fix: alert to material design changes </s> remove iconColor: mode(`${status}.500`, `${status}.200`)(props),
</s> add iconColor: mode(`${colorScheme}.500`, `${colorScheme}.200`)(props), </s> remove let { status, theme } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme, theme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove getColor(theme, `${status}.600`, status),
getColor(theme, `${status}.300`, status)
</s> add getColor(theme, `${colorScheme}.600`, colorScheme),
getColor(theme, `${colorScheme}.300`, colorScheme) </s> remove let { status, theme } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme, theme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove borderColor: transparentize(`${status}.600`, 0.2)(theme),
iconColor: mode(`${status}.500`, `${status}.200`)(props),
textColor: getColor(theme, `${status}.900`, status),
</s> add borderColor: transparentize(`${colorScheme}.600`, 0.2)(theme),
iconColor: mode(`${colorScheme}.500`, `${colorScheme}.200`)(props),
textColor: getColor(theme, `${colorScheme}.900`, colorScheme), | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/theme/components/alert.ts |
iconColor: mode(`${colorScheme}.500`, `${colorScheme}.200`)(props), | <mask> let { status, theme } = props;
<mask> status = getColorScheme(props, status);
<mask> return {
<mask> bg: getBg(props),
<mask> iconColor: mode(`${status}.500`, `${status}.200`)(props),
<mask> textColor: mode(
<mask> getColor(theme, `${status}.600`, status),
<mask> getColor(theme, `${status}.300`, status)
<mask> )(props),
<mask> };
</s> fix: alert to material design changes </s> remove getColor(theme, `${status}.600`, status),
getColor(theme, `${status}.300`, status)
</s> add getColor(theme, `${colorScheme}.600`, colorScheme),
getColor(theme, `${colorScheme}.300`, colorScheme) </s> remove let { status, theme } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme, theme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove let { status, theme } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme, theme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove borderColor: mode(`${status}.600`, `${status}.500`)(props),
iconColor: mode(`${status}.500`, `${status}.500`)(props),
textColor: getColor(theme, `${status}.700`, status),
</s> add borderColor: mode(`${colorScheme}.600`, `${colorScheme}.500`)(props),
iconColor: mode(`${colorScheme}.500`, `${colorScheme}.500`)(props),
textColor: getColor(theme, `${colorScheme}.700`, colorScheme), </s> remove borderColor: transparentize(`${status}.600`, 0.2)(theme),
iconColor: mode(`${status}.500`, `${status}.200`)(props),
textColor: getColor(theme, `${status}.900`, status),
</s> add borderColor: transparentize(`${colorScheme}.600`, 0.2)(theme),
iconColor: mode(`${colorScheme}.500`, `${colorScheme}.200`)(props),
textColor: getColor(theme, `${colorScheme}.900`, colorScheme), | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/theme/components/alert.ts |
getColor(theme, `${colorScheme}.600`, colorScheme),
getColor(theme, `${colorScheme}.300`, colorScheme) | <mask> return {
<mask> bg: getBg(props),
<mask> iconColor: mode(`${status}.500`, `${status}.200`)(props),
<mask> textColor: mode(
<mask> getColor(theme, `${status}.600`, status),
<mask> getColor(theme, `${status}.300`, status)
<mask> )(props),
<mask> };
<mask> };
<mask>
<mask> const variantOutline = (props: Record<string, any>) => {
</s> fix: alert to material design changes </s> remove iconColor: mode(`${status}.500`, `${status}.200`)(props),
</s> add iconColor: mode(`${colorScheme}.500`, `${colorScheme}.200`)(props), </s> remove let { status, theme } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme, theme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove let { status, theme } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme, theme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove let { status, theme } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme, theme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove borderColor: transparentize(`${status}.600`, 0.2)(theme),
iconColor: mode(`${status}.500`, `${status}.200`)(props),
textColor: getColor(theme, `${status}.900`, status),
</s> add borderColor: transparentize(`${colorScheme}.600`, 0.2)(theme),
iconColor: mode(`${colorScheme}.500`, `${colorScheme}.200`)(props),
textColor: getColor(theme, `${colorScheme}.900`, colorScheme), | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/theme/components/alert.ts |
let { colorScheme, theme } = props;
colorScheme = getColorScheme(props, colorScheme); | <mask> };
<mask> };
<mask>
<mask> const variantOutline = (props: Record<string, any>) => {
<mask> let { status, theme } = props;
<mask> status = getColorScheme(props, status);
<mask> return {
<mask> borderWidth: 1,
<mask> borderColor: mode(`${status}.600`, `${status}.500`)(props),
<mask> iconColor: mode(`${status}.500`, `${status}.500`)(props),
<mask> textColor: getColor(theme, `${status}.700`, status),
</s> fix: alert to material design changes </s> remove borderColor: mode(`${status}.600`, `${status}.500`)(props),
iconColor: mode(`${status}.500`, `${status}.500`)(props),
textColor: getColor(theme, `${status}.700`, status),
</s> add borderColor: mode(`${colorScheme}.600`, `${colorScheme}.500`)(props),
iconColor: mode(`${colorScheme}.500`, `${colorScheme}.500`)(props),
textColor: getColor(theme, `${colorScheme}.700`, colorScheme), </s> remove let { status, theme } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme, theme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove borderColor: transparentize(`${status}.600`, 0.2)(theme),
iconColor: mode(`${status}.500`, `${status}.200`)(props),
textColor: getColor(theme, `${status}.900`, status),
</s> add borderColor: transparentize(`${colorScheme}.600`, 0.2)(theme),
iconColor: mode(`${colorScheme}.500`, `${colorScheme}.200`)(props),
textColor: getColor(theme, `${colorScheme}.900`, colorScheme), </s> remove let { status, theme } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme, theme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove let { status } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme } = props;
colorScheme = getColorScheme(props, colorScheme); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/theme/components/alert.ts |
borderColor: mode(`${colorScheme}.600`, `${colorScheme}.500`)(props),
iconColor: mode(`${colorScheme}.500`, `${colorScheme}.500`)(props),
textColor: getColor(theme, `${colorScheme}.700`, colorScheme), | <mask> let { status, theme } = props;
<mask> status = getColorScheme(props, status);
<mask> return {
<mask> borderWidth: 1,
<mask> borderColor: mode(`${status}.600`, `${status}.500`)(props),
<mask> iconColor: mode(`${status}.500`, `${status}.500`)(props),
<mask> textColor: getColor(theme, `${status}.700`, status),
<mask> };
<mask> };
<mask> const variantOutlineLight = (props: Record<string, any>) => {
<mask> let { status, theme } = props;
<mask> status = getColorScheme(props, status);
</s> fix: alert to material design changes </s> remove let { status, theme } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme, theme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove let { status, theme } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme, theme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove borderColor: transparentize(`${status}.600`, 0.2)(theme),
iconColor: mode(`${status}.500`, `${status}.200`)(props),
textColor: getColor(theme, `${status}.900`, status),
</s> add borderColor: transparentize(`${colorScheme}.600`, 0.2)(theme),
iconColor: mode(`${colorScheme}.500`, `${colorScheme}.200`)(props),
textColor: getColor(theme, `${colorScheme}.900`, colorScheme), </s> remove let { status, theme } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme, theme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove iconColor: mode(`${status}.500`, `${status}.200`)(props),
</s> add iconColor: mode(`${colorScheme}.500`, `${colorScheme}.200`)(props), | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/theme/components/alert.ts |
let { colorScheme, theme } = props;
colorScheme = getColorScheme(props, colorScheme); | <mask> textColor: getColor(theme, `${status}.700`, status),
<mask> };
<mask> };
<mask> const variantOutlineLight = (props: Record<string, any>) => {
<mask> let { status, theme } = props;
<mask> status = getColorScheme(props, status);
<mask> return {
<mask> borderWidth: 1,
<mask> borderColor: transparentize(`${status}.600`, 0.2)(theme),
<mask> iconColor: mode(`${status}.500`, `${status}.200`)(props),
<mask> textColor: getColor(theme, `${status}.900`, status),
</s> fix: alert to material design changes </s> remove borderColor: transparentize(`${status}.600`, 0.2)(theme),
iconColor: mode(`${status}.500`, `${status}.200`)(props),
textColor: getColor(theme, `${status}.900`, status),
</s> add borderColor: transparentize(`${colorScheme}.600`, 0.2)(theme),
iconColor: mode(`${colorScheme}.500`, `${colorScheme}.200`)(props),
textColor: getColor(theme, `${colorScheme}.900`, colorScheme), </s> remove borderColor: mode(`${status}.600`, `${status}.500`)(props),
iconColor: mode(`${status}.500`, `${status}.500`)(props),
textColor: getColor(theme, `${status}.700`, status),
</s> add borderColor: mode(`${colorScheme}.600`, `${colorScheme}.500`)(props),
iconColor: mode(`${colorScheme}.500`, `${colorScheme}.500`)(props),
textColor: getColor(theme, `${colorScheme}.700`, colorScheme), </s> remove let { status, theme } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme, theme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove let { status, theme } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme, theme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove iconColor: mode(`${status}.500`, `${status}.200`)(props),
</s> add iconColor: mode(`${colorScheme}.500`, `${colorScheme}.200`)(props), | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/theme/components/alert.ts |
borderColor: transparentize(`${colorScheme}.600`, 0.2)(theme),
iconColor: mode(`${colorScheme}.500`, `${colorScheme}.200`)(props),
textColor: getColor(theme, `${colorScheme}.900`, colorScheme), | <mask> let { status, theme } = props;
<mask> status = getColorScheme(props, status);
<mask> return {
<mask> borderWidth: 1,
<mask> borderColor: transparentize(`${status}.600`, 0.2)(theme),
<mask> iconColor: mode(`${status}.500`, `${status}.200`)(props),
<mask> textColor: getColor(theme, `${status}.900`, status),
<mask> };
<mask> };
<mask>
<mask> const variantSolid = (props: Record<string, any>) => {
<mask> let { status } = props;
</s> fix: alert to material design changes </s> remove let { status, theme } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme, theme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove let { status, theme } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme, theme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove borderColor: mode(`${status}.600`, `${status}.500`)(props),
iconColor: mode(`${status}.500`, `${status}.500`)(props),
textColor: getColor(theme, `${status}.700`, status),
</s> add borderColor: mode(`${colorScheme}.600`, `${colorScheme}.500`)(props),
iconColor: mode(`${colorScheme}.500`, `${colorScheme}.500`)(props),
textColor: getColor(theme, `${colorScheme}.700`, colorScheme), </s> remove let { status, theme } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme, theme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove let { status } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme } = props;
colorScheme = getColorScheme(props, colorScheme); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/theme/components/alert.ts |
let { colorScheme } = props;
colorScheme = getColorScheme(props, colorScheme); | <mask> };
<mask> };
<mask>
<mask> const variantSolid = (props: Record<string, any>) => {
<mask> let { status } = props;
<mask> status = getColorScheme(props, status);
<mask> return {
<mask> borderWidth: 6,
<mask> borderColor: 'transparent',
<mask> bg: getBg(props),
<mask> iconColor: mode(`white`, `${status}.300`)(props),
</s> fix: alert to material design changes </s> remove iconColor: mode(`white`, `${status}.300`)(props),
textColor: mode('white', `${status}.200`)(props),
</s> add iconColor: mode(`white`, `${colorScheme}.300`)(props),
textColor: mode('white', `${colorScheme}.200`)(props), </s> remove let { status } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove borderLeftColor: mode(`${status}.600`, `${status}.300`)(props),
</s> add borderLeftColor: mode(`${colorScheme}.600`, `${colorScheme}.300`)(props), </s> remove let { status } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove borderColor: transparentize(`${status}.600`, 0.2)(theme),
iconColor: mode(`${status}.500`, `${status}.200`)(props),
textColor: getColor(theme, `${status}.900`, status),
</s> add borderColor: transparentize(`${colorScheme}.600`, 0.2)(theme),
iconColor: mode(`${colorScheme}.500`, `${colorScheme}.200`)(props),
textColor: getColor(theme, `${colorScheme}.900`, colorScheme), | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/theme/components/alert.ts |
iconColor: mode(`white`, `${colorScheme}.300`)(props),
textColor: mode('white', `${colorScheme}.200`)(props), | <mask> return {
<mask> borderWidth: 6,
<mask> borderColor: 'transparent',
<mask> bg: getBg(props),
<mask> iconColor: mode(`white`, `${status}.300`)(props),
<mask> textColor: mode('white', `${status}.200`)(props),
<mask> };
<mask> };
<mask> const variantLeftAccent = (props: Record<string, any>) => {
<mask> let { status } = props;
<mask> status = getColorScheme(props, status);
</s> fix: alert to material design changes </s> remove let { status } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove let { status } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove let { status } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove borderLeftColor: mode(`${status}.600`, `${status}.300`)(props),
</s> add borderLeftColor: mode(`${colorScheme}.600`, `${colorScheme}.300`)(props), </s> remove iconColor: mode(`${status}.500`, `${status}.200`)(props),
textColor: mode(`${status}.600`, `${status}.300`)(props),
</s> add iconColor: mode(`${colorScheme}.500`, `${colorScheme}.200`)(props),
textColor: mode(`${colorScheme}.600`, `${colorScheme}.300`)(props), | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/theme/components/alert.ts |
let { colorScheme } = props;
colorScheme = getColorScheme(props, colorScheme); | <mask> textColor: mode('white', `${status}.200`)(props),
<mask> };
<mask> };
<mask> const variantLeftAccent = (props: Record<string, any>) => {
<mask> let { status } = props;
<mask> status = getColorScheme(props, status);
<mask> return {
<mask> borderWidth: 4,
<mask> bg: getBg(props),
<mask> iconColor: mode(`${status}.500`, `${status}.200`)(props),
<mask> textColor: mode(`${status}.600`, `${status}.300`)(props),
</s> fix: alert to material design changes </s> remove iconColor: mode(`white`, `${status}.300`)(props),
textColor: mode('white', `${status}.200`)(props),
</s> add iconColor: mode(`white`, `${colorScheme}.300`)(props),
textColor: mode('white', `${colorScheme}.200`)(props), </s> remove iconColor: mode(`${status}.500`, `${status}.200`)(props),
textColor: mode(`${status}.600`, `${status}.300`)(props),
</s> add iconColor: mode(`${colorScheme}.500`, `${colorScheme}.200`)(props),
textColor: mode(`${colorScheme}.600`, `${colorScheme}.300`)(props), </s> remove borderLeftColor: mode(`${status}.600`, `${status}.300`)(props),
</s> add borderLeftColor: mode(`${colorScheme}.600`, `${colorScheme}.300`)(props), </s> remove let { status } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove borderTopColor: mode(`${status}.600`, `${status}.300`)(props),
</s> add borderTopColor: mode(`${colorScheme}.600`, `${colorScheme}.300`)(props), | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/theme/components/alert.ts |
iconColor: mode(`${colorScheme}.500`, `${colorScheme}.200`)(props),
textColor: mode(`${colorScheme}.600`, `${colorScheme}.300`)(props), | <mask> status = getColorScheme(props, status);
<mask> return {
<mask> borderWidth: 4,
<mask> bg: getBg(props),
<mask> iconColor: mode(`${status}.500`, `${status}.200`)(props),
<mask> textColor: mode(`${status}.600`, `${status}.300`)(props),
<mask> borderColor: 'transparent',
<mask> borderLeftColor: mode(`${status}.600`, `${status}.300`)(props),
<mask> };
<mask> };
<mask> const variantTopAccent = (props: Record<string, any>) => {
</s> fix: alert to material design changes </s> remove borderLeftColor: mode(`${status}.600`, `${status}.300`)(props),
</s> add borderLeftColor: mode(`${colorScheme}.600`, `${colorScheme}.300`)(props), </s> remove let { status } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove borderTopColor: mode(`${status}.600`, `${status}.300`)(props),
</s> add borderTopColor: mode(`${colorScheme}.600`, `${colorScheme}.300`)(props), </s> remove iconColor: mode(`${status}.500`, `${status}.200`)(props),
textColor: mode(`${status}.600`, `${status}.300`)(props),
</s> add iconColor: mode(`${colorScheme}.500`, `${colorScheme}.200`)(props),
textColor: mode(`${colorScheme}.600`, `${colorScheme}.300`)(props), </s> remove let { status } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme } = props;
colorScheme = getColorScheme(props, colorScheme); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/theme/components/alert.ts |
borderLeftColor: mode(`${colorScheme}.600`, `${colorScheme}.300`)(props), | <mask> bg: getBg(props),
<mask> iconColor: mode(`${status}.500`, `${status}.200`)(props),
<mask> textColor: mode(`${status}.600`, `${status}.300`)(props),
<mask> borderColor: 'transparent',
<mask> borderLeftColor: mode(`${status}.600`, `${status}.300`)(props),
<mask> };
<mask> };
<mask> const variantTopAccent = (props: Record<string, any>) => {
<mask> let { status } = props;
<mask> status = getColorScheme(props, status);
</s> fix: alert to material design changes </s> remove iconColor: mode(`${status}.500`, `${status}.200`)(props),
textColor: mode(`${status}.600`, `${status}.300`)(props),
</s> add iconColor: mode(`${colorScheme}.500`, `${colorScheme}.200`)(props),
textColor: mode(`${colorScheme}.600`, `${colorScheme}.300`)(props), </s> remove let { status } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove let { status } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove borderTopColor: mode(`${status}.600`, `${status}.300`)(props),
</s> add borderTopColor: mode(`${colorScheme}.600`, `${colorScheme}.300`)(props), </s> remove iconColor: mode(`${status}.500`, `${status}.200`)(props),
textColor: mode(`${status}.600`, `${status}.300`)(props),
</s> add iconColor: mode(`${colorScheme}.500`, `${colorScheme}.200`)(props),
textColor: mode(`${colorScheme}.600`, `${colorScheme}.300`)(props), | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/theme/components/alert.ts |
let { colorScheme } = props;
colorScheme = getColorScheme(props, colorScheme); | <mask> borderLeftColor: mode(`${status}.600`, `${status}.300`)(props),
<mask> };
<mask> };
<mask> const variantTopAccent = (props: Record<string, any>) => {
<mask> let { status } = props;
<mask> status = getColorScheme(props, status);
<mask> return {
<mask> borderWidth: 4,
<mask> borderColor: 'transparent',
<mask> borderTopColor: mode(`${status}.600`, `${status}.300`)(props),
<mask> bg: getBg(props),
</s> fix: alert to material design changes </s> remove borderLeftColor: mode(`${status}.600`, `${status}.300`)(props),
</s> add borderLeftColor: mode(`${colorScheme}.600`, `${colorScheme}.300`)(props), </s> remove iconColor: mode(`${status}.500`, `${status}.200`)(props),
textColor: mode(`${status}.600`, `${status}.300`)(props),
</s> add iconColor: mode(`${colorScheme}.500`, `${colorScheme}.200`)(props),
textColor: mode(`${colorScheme}.600`, `${colorScheme}.300`)(props), </s> remove borderTopColor: mode(`${status}.600`, `${status}.300`)(props),
</s> add borderTopColor: mode(`${colorScheme}.600`, `${colorScheme}.300`)(props), </s> remove iconColor: mode(`${status}.500`, `${status}.200`)(props),
textColor: mode(`${status}.600`, `${status}.300`)(props),
</s> add iconColor: mode(`${colorScheme}.500`, `${colorScheme}.200`)(props),
textColor: mode(`${colorScheme}.600`, `${colorScheme}.300`)(props), </s> remove let { status } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme } = props;
colorScheme = getColorScheme(props, colorScheme); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/theme/components/alert.ts |
borderTopColor: mode(`${colorScheme}.600`, `${colorScheme}.300`)(props), | <mask> status = getColorScheme(props, status);
<mask> return {
<mask> borderWidth: 4,
<mask> borderColor: 'transparent',
<mask> borderTopColor: mode(`${status}.600`, `${status}.300`)(props),
<mask> bg: getBg(props),
<mask> iconColor: mode(`${status}.500`, `${status}.200`)(props),
<mask> textColor: mode(`${status}.600`, `${status}.300`)(props),
<mask> };
<mask> };
</s> fix: alert to material design changes </s> remove iconColor: mode(`${status}.500`, `${status}.200`)(props),
textColor: mode(`${status}.600`, `${status}.300`)(props),
</s> add iconColor: mode(`${colorScheme}.500`, `${colorScheme}.200`)(props),
textColor: mode(`${colorScheme}.600`, `${colorScheme}.300`)(props), </s> remove iconColor: mode(`${status}.500`, `${status}.200`)(props),
textColor: mode(`${status}.600`, `${status}.300`)(props),
</s> add iconColor: mode(`${colorScheme}.500`, `${colorScheme}.200`)(props),
textColor: mode(`${colorScheme}.600`, `${colorScheme}.300`)(props), </s> remove let { status } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove borderLeftColor: mode(`${status}.600`, `${status}.300`)(props),
</s> add borderLeftColor: mode(`${colorScheme}.600`, `${colorScheme}.300`)(props), </s> remove let { status } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme } = props;
colorScheme = getColorScheme(props, colorScheme); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/theme/components/alert.ts |
iconColor: mode(`${colorScheme}.500`, `${colorScheme}.200`)(props),
textColor: mode(`${colorScheme}.600`, `${colorScheme}.300`)(props), | <mask> borderWidth: 4,
<mask> borderColor: 'transparent',
<mask> borderTopColor: mode(`${status}.600`, `${status}.300`)(props),
<mask> bg: getBg(props),
<mask> iconColor: mode(`${status}.500`, `${status}.200`)(props),
<mask> textColor: mode(`${status}.600`, `${status}.300`)(props),
<mask> };
<mask> };
<mask>
<mask> const variants = {
<mask> 'subtle': variantSubtle,
</s> fix: alert to material design changes </s> remove borderTopColor: mode(`${status}.600`, `${status}.300`)(props),
</s> add borderTopColor: mode(`${colorScheme}.600`, `${colorScheme}.300`)(props), </s> remove iconColor: mode(`${status}.500`, `${status}.200`)(props),
textColor: mode(`${status}.600`, `${status}.300`)(props),
</s> add iconColor: mode(`${colorScheme}.500`, `${colorScheme}.200`)(props),
textColor: mode(`${colorScheme}.600`, `${colorScheme}.300`)(props), </s> remove let { status } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme } = props;
colorScheme = getColorScheme(props, colorScheme); </s> remove borderLeftColor: mode(`${status}.600`, `${status}.300`)(props),
</s> add borderLeftColor: mode(`${colorScheme}.600`, `${colorScheme}.300`)(props), </s> remove let { status } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme } = props;
colorScheme = getColorScheme(props, colorScheme); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/theme/components/alert.ts |
minW: '100%',
maxW: '100%',
position: 'relative',
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'flex-start',
flexWrap: 'wrap',
colorScheme: 'primary', | <mask> };
<mask>
<mask> export const Alert = {
<mask> defaultProps: {
<mask> status: 'primary',
<mask> variant: 'subtle',
<mask> p: 4,
<mask> borderRadius: 'lg',
<mask> },
<mask> variants,
</s> fix: alert to material design changes </s> remove p: 4,
borderRadius: 'lg',
</s> add px: 4,
py: 3,
borderRadius: 'md',
shadow: 2, </s> remove const { status, variant, iconColor, textColor, ...newProps } = useThemeProps(
'Alert',
props
);
</s> add const {
status,
variant,
iconColor,
textColor,
colorScheme,
...newProps
} = useThemeProps('Alert', props); </s> remove <Text mr={2} color={textColor} {...newProps} {..._text}>
</s> add <Text color={textColor} {...newProps} {..._text}> </s> remove let { status } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme } = props;
colorScheme = getColorScheme(props, colorScheme); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/theme/components/alert.ts |
px: 4,
py: 3,
borderRadius: 'md',
shadow: 2, | <mask> export const Alert = {
<mask> defaultProps: {
<mask> status: 'primary',
<mask> variant: 'subtle',
<mask> p: 4,
<mask> borderRadius: 'lg',
<mask> },
<mask> variants,
<mask> };
<mask>
<mask> // AlertTitle
</s> fix: alert to material design changes </s> remove status: 'primary',
</s> add minW: '100%',
maxW: '100%',
position: 'relative',
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'flex-start',
flexWrap: 'wrap',
colorScheme: 'primary', </s> remove <Text mr={2} color={textColor} {...newProps} {..._text}>
</s> add <Text color={textColor} {...newProps} {..._text}> </s> remove const { status, variant, iconColor, textColor, ...newProps } = useThemeProps(
'Alert',
props
);
</s> add const {
status,
variant,
iconColor,
textColor,
colorScheme,
...newProps
} = useThemeProps('Alert', props); </s> remove let { status } = props;
status = getColorScheme(props, status);
</s> add let { colorScheme } = props;
colorScheme = getColorScheme(props, colorScheme); | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/theme/components/alert.ts |
mr: 2,
},
};
// AlertIcon
export const AlertIcon = {
defaultProps: {
type: 'MaterialIcons',
size: 8,
mr: 2, | <mask> defaultProps: {
<mask> fontSize: 'md',
<mask> fontWeight: 'semibold',
<mask> },
<mask> };
<mask>
<mask> // AlertDescription
<mask> export const AlertDescription = {
<mask> defaultProps: {
</s> fix: alert to material design changes </s> remove p: 4,
borderRadius: 'lg',
</s> add px: 4,
py: 3,
borderRadius: 'md',
shadow: 2, </s> remove status: 'primary',
</s> add minW: '100%',
maxW: '100%',
position: 'relative',
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'flex-start',
flexWrap: 'wrap',
colorScheme: 'primary', </s> remove <Text mr={2} color={textColor} {...newProps} {..._text}>
</s> add <Text color={textColor} {...newProps} {..._text}> </s> remove const newProps = omitUndefined(props);
</s> add let newProps = useThemeProps('AlertIcon', props);
newProps = omitUndefined(newProps); </s> remove const { status, variant, iconColor, textColor, ...newProps } = useThemeProps(
'Alert',
props
);
</s> add const {
status,
variant,
iconColor,
textColor,
colorScheme,
...newProps
} = useThemeProps('Alert', props); | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/theme/components/alert.ts |
import { Alert, AlertDescription, AlertTitle, AlertIcon } from './alert'; | <mask> ActionsheetFooter,
<mask> ActionsheetItem,
<mask> } from './actionsheet';
<mask> import { Select, SelectItem } from './select';
<mask> import { Alert, AlertDescription, AlertTitle } from './alert';
<mask> import Avatar from './avatar';
<mask> import AvatarBadge from './avatar-badge';
<mask> import Badge from './badge';
<mask> import Breadcrumb from './breadcrumb';
<mask> import Button from './button';
</s> fix: alert to material design changes </s> remove const newProps = omitUndefined(props);
</s> add let newProps = useThemeProps('AlertIcon', props);
newProps = omitUndefined(newProps); </s> remove let { theme, status, variant } = props;
</s> add let { theme, colorScheme, variant } = props; </s> remove <Text mr={2} color={textColor} {...newProps} {..._text}>
</s> add <Text color={textColor} {...newProps} {..._text}> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/theme/components/index.ts |
AlertIcon, | <mask> Alert,
<mask> AlertDescription,
<mask> AlertTitle,
<mask> Avatar,
<mask> AvatarBadge,
<mask> Badge,
<mask> Breadcrumb,
<mask> Button,
<mask> Center,
</s> fix: alert to material design changes </s> remove import { Alert, AlertDescription, AlertTitle } from './alert';
</s> add import { Alert, AlertDescription, AlertTitle, AlertIcon } from './alert'; </s> remove <CloseButton position="absolute" right="8px" />
</s> add <CloseButton position="absolute" right="8px" size="xs" /> </s> remove <Alert status="error" variant={key} key={key}>
</s> add <Alert status="error" colorScheme="error" variant={key} key={key}> </s> remove ? getColor(theme, `${status}.400`, status)
: getColor(theme, `${status}.100`, status);
</s> add ? getColor(theme, `${colorScheme}.400`, colorScheme)
: getColor(theme, `${colorScheme}.100`, colorScheme); </s> remove status = getColorScheme(props, status);
</s> add colorScheme = getColorScheme(props, colorScheme); | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3bc2811f3138c1e521d26244149ff5c27dd98e26 | src/theme/components/index.ts |
import React, { RefObject, useEffect, ReactNode } from 'react'; | <mask> import React from 'react';
<mask> import type { Modal as ModalType } from 'react-native';
<mask> import {
<mask> KeyboardAvoidingView,
<mask> Modal as RNModal,
<mask> Platform,
</s> fix: modal focus - v3 modal focus behaviour on web </s> remove <Box ref={ref} nativeID={id} h="100%">
{modalChildren}
</Box>
</s> add <FocusScope
contain
restoreFocus={!(finalFocusRef && finalFocusRef.current)}
autoFocus={!(initialFocusRef && initialFocusRef.current)}
>
<Box ref={ref} nativeID={id} h="100%">
<ModalWeb
initialFocusRef={initialFocusRef}
finalFocusRef={finalFocusRef}
>
{modalChildren}
</ModalWeb>
</Box>
</FocusScope> | [
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3c1a76b8d2352db83bd35caa7e030eb96cd1f8a7 | src/components/composites/Modal/index.tsx |
import { FocusScope } from '@react-aria/focus'; | <mask> import { useOverlay } from '../../../core/Overlay';
<mask> import { useThemeProps } from '../../../hooks';
<mask> import {
<mask> customBackground,
<mask> customBorder,
<mask> customExtra,
</s> fix: modal focus - v3 modal focus behaviour on web </s> remove import React from 'react';
</s> add import React, { RefObject, useEffect, ReactNode } from 'react'; </s> remove <Box ref={ref} nativeID={id} h="100%">
{modalChildren}
</Box>
</s> add <FocusScope
contain
restoreFocus={!(finalFocusRef && finalFocusRef.current)}
autoFocus={!(initialFocusRef && initialFocusRef.current)}
>
<Box ref={ref} nativeID={id} h="100%">
<ModalWeb
initialFocusRef={initialFocusRef}
finalFocusRef={finalFocusRef}
>
{modalChildren}
</ModalWeb>
</Box>
</FocusScope> | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3c1a76b8d2352db83bd35caa7e030eb96cd1f8a7 | src/components/composites/Modal/index.tsx |
<FocusScope
contain
restoreFocus={!(finalFocusRef && finalFocusRef.current)}
autoFocus={!(initialFocusRef && initialFocusRef.current)}
>
<Box ref={ref} nativeID={id} h="100%">
<ModalWeb
initialFocusRef={initialFocusRef}
finalFocusRef={finalFocusRef}
>
{modalChildren}
</ModalWeb>
</Box>
</FocusScope> | <mask> () => {
<mask> isOpen && Platform.OS === 'web'
<mask> ? setOverlay(
<mask> <ModalContext.Provider value={value}>
<mask> <Box ref={ref} nativeID={id} h="100%">
<mask> {modalChildren}
<mask> </Box>
<mask> </ModalContext.Provider>,
<mask> {
<mask> onClose: onClose,
<mask> closeOnPress: props.closeOnOverlayClick === false ? false : true,
<mask> backgroundColor: overlayColor ? overlayColor : undefined,
</s> fix: modal focus - v3 modal focus behaviour on web </s> remove import React from 'react';
</s> add import React, { RefObject, useEffect, ReactNode } from 'react'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3c1a76b8d2352db83bd35caa7e030eb96cd1f8a7 | src/components/composites/Modal/index.tsx |
colorScheme="emerald" | <mask> import { IconButton, Icon } from 'native-base';
<mask> export default function () {
<mask> return (
<mask> <IconButton
<mask> colorScheme="blue"
<mask> variant="outline"
<mask> icon={<Icon name={'search'} />}
<mask> />
<mask> );
<mask> }
</s> fix: updated examples as per Docs </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { Stack, IconButton, Icon } from 'native-base'; </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { Stack, IconButton, Icon } from 'native-base'; </s> remove <Icon name="menu" />
</s> add </s> remove <HStack space={4}>
</s> add <Stack space={4}> </s> remove <HStack space={4}>
{[8, 10, 12].map((size: any) => (
</s> add <Stack space={4}>
{['sm', 'md', 'lg'].map((size: any) => ( | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3d3eb2427377f0ca798a3b1fdcec70b68d254dae | example/storybook/stories/components/composites/IconButton/Basic.tsx |
colorScheme="emerald" | <mask>
<mask> export default function () {
<mask> return (
<mask> <IconButton
<mask> colorScheme="blue"
<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
</s> fix: updated examples as per Docs </s> remove <Icon name="menu" />
</s> add </s> remove <HStack space={4}>
{[8, 10, 12].map((size: any) => (
</s> add <Stack space={4}>
{['sm', 'md', 'lg'].map((size: any) => ( </s> remove <HStack space={4}>
</s> add <Stack space={4}> </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { Stack, IconButton, Icon } from 'native-base'; </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { Stack, IconButton, Icon } from 'native-base'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3d3eb2427377f0ca798a3b1fdcec70b68d254dae | example/storybook/stories/components/composites/IconButton/SVGIcon.tsx |
import { Stack, IconButton, Icon } from 'native-base'; | <mask> import React from 'react';
<mask> import { HStack, IconButton, Icon } from 'native-base';
<mask> export default function () {
<mask> return (
<mask> <HStack space={4}>
<mask> {[8, 10, 12].map((size: any) => (
<mask> <IconButton
</s> fix: updated examples as per Docs </s> remove <HStack space={4}>
{[8, 10, 12].map((size: any) => (
</s> add <Stack space={4}>
{['sm', 'md', 'lg'].map((size: any) => ( </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { Stack, IconButton, Icon } from 'native-base'; </s> remove <HStack space={4}>
</s> add <Stack space={4}> </s> remove key={size}
</s> add </s> remove colorScheme="blue"
</s> add colorScheme="emerald" | [
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3d3eb2427377f0ca798a3b1fdcec70b68d254dae | example/storybook/stories/components/composites/IconButton/Sizes.tsx |
<Stack space={4}>
{['sm', 'md', 'lg'].map((size: any) => ( | <mask> import React from 'react';
<mask> import { HStack, IconButton, Icon } from 'native-base';
<mask> export default function () {
<mask> return (
<mask> <HStack space={4}>
<mask> {[8, 10, 12].map((size: any) => (
<mask> <IconButton
<mask> key={size}
<mask> size={size}
<mask> variant="solid"
<mask> colorScheme="blue"
</s> fix: updated examples as per Docs </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { Stack, IconButton, Icon } from 'native-base'; </s> remove key={size}
</s> add </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { Stack, IconButton, Icon } from 'native-base'; </s> remove <HStack space={4}>
</s> add <Stack space={4}> </s> remove colorScheme="blue"
</s> add colorScheme="emerald" | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3d3eb2427377f0ca798a3b1fdcec70b68d254dae | example/storybook/stories/components/composites/IconButton/Sizes.tsx |
<mask> return (
<mask> <HStack space={4}>
<mask> {[8, 10, 12].map((size: any) => (
<mask> <IconButton
<mask> key={size}
<mask> size={size}
<mask> variant="solid"
<mask> colorScheme="blue"
<mask> icon={<Icon name={'menu'} />}
<mask> />
</s> fix: updated examples as per Docs </s> remove <HStack space={4}>
{[8, 10, 12].map((size: any) => (
</s> add <Stack space={4}>
{['sm', 'md', 'lg'].map((size: any) => ( </s> remove colorScheme="blue"
icon={<Icon name={'menu'} />}
</s> add colorScheme="emerald"
icon={<Icon name={'menu'} color="white" />} </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { Stack, IconButton, Icon } from 'native-base'; </s> remove </HStack>
</s> add </Stack> </s> remove <HStack space={4}>
</s> add <Stack space={4}> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3d3eb2427377f0ca798a3b1fdcec70b68d254dae | example/storybook/stories/components/composites/IconButton/Sizes.tsx | |
colorScheme="emerald"
icon={<Icon name={'menu'} color="white" />} | <mask> <IconButton
<mask> key={size}
<mask> size={size}
<mask> variant="solid"
<mask> colorScheme="blue"
<mask> icon={<Icon name={'menu'} />}
<mask> />
<mask> ))}
<mask> </HStack>
<mask> );
<mask> }
</s> fix: updated examples as per Docs </s> remove </HStack>
</s> add </Stack> </s> remove key={size}
</s> add </s> remove colorScheme="blue"
</s> add colorScheme="emerald" </s> remove <HStack space={4}>
{[8, 10, 12].map((size: any) => (
</s> add <Stack space={4}>
{['sm', 'md', 'lg'].map((size: any) => ( </s> remove <Icon name="menu" />
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3d3eb2427377f0ca798a3b1fdcec70b68d254dae | example/storybook/stories/components/composites/IconButton/Sizes.tsx |
</Stack> | <mask> colorScheme="blue"
<mask> icon={<Icon name={'menu'} />}
<mask> />
<mask> ))}
<mask> </HStack>
<mask> );
<mask> }
</s> fix: updated examples as per Docs </s> remove colorScheme="blue"
icon={<Icon name={'menu'} />}
</s> add colorScheme="emerald"
icon={<Icon name={'menu'} color="white" />} </s> remove key={size}
</s> add </s> remove colorScheme="blue"
</s> add colorScheme="emerald" </s> remove <Icon name="menu" />
</s> add </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { Stack, IconButton, Icon } from 'native-base'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3d3eb2427377f0ca798a3b1fdcec70b68d254dae | example/storybook/stories/components/composites/IconButton/Sizes.tsx |
import { Stack, IconButton, Icon } from 'native-base'; | <mask> import React from 'react';
<mask> import { HStack, IconButton, Icon } from 'native-base';
<mask> export default function () {
<mask> return (
<mask> <HStack space={4}>
<mask> {['outline', 'solid', 'ghost'].map((variant: any) => (
<mask> <IconButton
</s> fix: updated examples as per Docs </s> remove <HStack space={4}>
</s> add <Stack space={4}> </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { Stack, IconButton, Icon } from 'native-base'; </s> remove <HStack space={4}>
{[8, 10, 12].map((size: any) => (
</s> add <Stack space={4}>
{['sm', 'md', 'lg'].map((size: any) => ( </s> remove colorScheme="blue"
</s> add colorScheme="emerald" </s> remove colorScheme="blue"
</s> add colorScheme="emerald" | [
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3d3eb2427377f0ca798a3b1fdcec70b68d254dae | example/storybook/stories/components/composites/IconButton/Variant.tsx |
<Stack space={4}> | <mask> import React from 'react';
<mask> import { HStack, IconButton, Icon } from 'native-base';
<mask> export default function () {
<mask> return (
<mask> <HStack space={4}>
<mask> {['outline', 'solid', 'ghost'].map((variant: any) => (
<mask> <IconButton
<mask> key={variant}
<mask> variant={variant}
<mask> colorScheme="teal"
</s> fix: updated examples as per Docs </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { Stack, IconButton, Icon } from 'native-base'; </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { Stack, IconButton, Icon } from 'native-base'; </s> remove <HStack space={4}>
{[8, 10, 12].map((size: any) => (
</s> add <Stack space={4}>
{['sm', 'md', 'lg'].map((size: any) => ( </s> remove colorScheme="blue"
</s> add colorScheme="emerald" </s> remove colorScheme="blue"
</s> add colorScheme="emerald" | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3d3eb2427377f0ca798a3b1fdcec70b68d254dae | example/storybook/stories/components/composites/IconButton/Variant.tsx |
<mask> borderColor="cyan.400"
<mask> />
<mask> <Button
<mask> onPress={() => {
<mask> // @ts-ignore
<mask> inputRef?.current?.focus();
<mask> }}
<mask> >
<mask> Set Focus
<mask> </Button>
</s> fix: updated examples as per Docs </s> remove colorScheme="blue"
</s> add colorScheme="emerald" </s> remove <HStack space={4}>
{[8, 10, 12].map((size: any) => (
</s> add <Stack space={4}>
{['sm', 'md', 'lg'].map((size: any) => ( </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { Stack, IconButton, Icon } from 'native-base'; </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { Stack, IconButton, Icon } from 'native-base'; </s> remove <HStack space={4}>
</s> add <Stack space={4}> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3d3eb2427377f0ca798a3b1fdcec70b68d254dae | example/storybook/stories/components/composites/factory/ref.tsx | |
<mask> import { Factory } from 'native-base';
<mask> import { Image, View, TouchableOpacity, Text } from 'react-native';
<mask>
<mask> export default function () {
<mask> const FactoryImage = Factory(Image);
<mask> const FactoryView = Factory(View);
<mask> const NBTouchable = Factory(TouchableOpacity);
<mask> const NBText = Factory(Text);
<mask> return (
<mask> <>
</s> fix: updated examples as per Docs </s> remove <Icon name="menu" />
</s> add </s> remove colorScheme="blue"
</s> add colorScheme="emerald" </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { Stack, IconButton, Icon } from 'native-base'; </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { Stack, IconButton, Icon } from 'native-base'; </s> remove <HStack space={4}>
</s> add <Stack space={4}> | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3d3eb2427377f0ca798a3b1fdcec70b68d254dae | example/storybook/stories/components/composites/factory/usage.tsx | |
<mask>
<mask> export default function () {
<mask> return (
<mask> <>
<mask> <Icon name="menu" />
<mask> <Icon type="Ionicons" name="md-checkmark-circle" />
<mask> <Icon name="stepforward" type="AntDesign" />
<mask> </>
<mask> );
<mask> }
</s> fix: updated examples as per Docs </s> remove colorScheme="blue"
</s> add colorScheme="emerald" </s> remove const FactoryImage = Factory(Image);
</s> add </s> remove colorScheme="blue"
</s> add colorScheme="emerald" </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { Stack, IconButton, Icon } from 'native-base'; </s> remove import { HStack, IconButton, Icon } from 'native-base';
</s> add import { Stack, IconButton, Icon } from 'native-base'; | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/GeekyAnts/NativeBase/commit/3d3eb2427377f0ca798a3b1fdcec70b68d254dae | example/storybook/stories/components/primitives/Icon/Basic.tsx |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.