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
|
---|---|---|---|---|
_text: {
fontFamily: 'mono',
fontSize: 'sm',
},
|
<mask>
<mask> const { variants, defaultProps } = Badge;
<mask>
<mask> const baseStyle = {
<mask> fontFamily: 'mono',
<mask> fontSize: 'sm',
<mask> borderRadius: 'sm',
<mask> px: 2,
<mask> py: 1,
<mask> };
<mask>
</s> fix: updated the code and theme to support api changes </s> remove const StyledCode = styled(Box)<ICodeProps>({});
const Code = ({ style, ...props }: ICodeProps) => {
let newProps = useThemeProps('Code', props);
</s> add const Code = ({ ...props }: ICodeProps) => {
let { ...newProps } = useThemeProps('Code', props); </s> remove console.log('newProps =', newProps);
</s> add </s> remove import styled from 'styled-components/native';
</s> add </s> remove <StyledCode
{...newProps}
</s> add <Box </s> remove export type ICodeProps = ITextProps &
ColorProps &
SpaceProps &
LayoutProps &
FlexboxProps &
customBorderProps &
customExtraProps &
customOutlineProps &
customShadowProps &
customLayoutProps &
customBackgroundProps &
BorderProps & {
style?: TextStyle;
children?: string | undefined;
colorScheme?: string | undefined;
};
</s> add export type ICodeProps = IBoxProps & {
colorScheme?: string | undefined;
};
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/977758e750745297257fa692a47c77fd8557b1a9
|
src/theme/components/code.ts
|
{
[key in string]: boolean;
}
|
<mask>
<mask> export const ToastProvider = ({ children }: { children: any }) => {
<mask> const [toastInfo, setToastInfo] = useState<IToastInfo>({});
<mask> const [visibleToasts, setVisibleToasts] = useState<
<mask> { [key in string]: boolean }
<mask> >({});
<mask> const themeProps = usePropsResolution('Toast', {});
<mask> const { colorMode } = useColorMode();
<mask> let toastIndex = React.useRef(1);
<mask>
</s> feat: performance fixes in toast provider and fixes in hybrid provider </s> remove const themeProps = usePropsResolution('Toast', {});
</s> add const [themeProps] = useState(usePropsResolution('Toast', {}));
</s> remove let toastIndex = React.useRef(1);
</s> add const toastIndex = React.useRef(1); </s> remove const hideAll = () => {
</s> add const hideAll = React.useCallback(() => { </s> remove };
const hideToast = (id: any) => {
setVisibleToasts((prevVisibleToasts) => ({
...prevVisibleToasts,
[id]: false,
}));
};
</s> add }, [setVisibleToasts]);
const hideToast = React.useCallback(
(id: any) => {
setVisibleToasts((prevVisibleToasts) => ({
...prevVisibleToasts,
[id]: false,
}));
},
[setVisibleToasts]
); </s> remove const removeToast = (id: any) => {
setToastInfo((prev) => {
for (let toastPosition of Object.keys(prev)) {
// @ts-ignore
let positionArray: Array<IToast> = prev[toastPosition];
const isToastPresent =
positionArray.findIndex((toastData) => toastData.id === id) > -1;
if (isToastPresent) {
let newPositionArray = positionArray.filter((item) => item.id !== id);
let temp: any = {};
temp[toastPosition] = newPositionArray;
let newToastInfo = { ...prev, ...temp };
return newToastInfo;
</s> add const removeToast = React.useCallback(
(id: any) => {
setToastInfo((prev) => {
for (const toastPosition of Object.keys(prev)) {
const positionArray: Array<IToast> = prev[toastPosition];
const isToastPresent =
positionArray.findIndex((toastData) => toastData.id === id) > -1;
if (isToastPresent) {
const newPositionArray = positionArray.filter(
(item) => item.id !== id
);
const temp: any = {};
temp[toastPosition] = newPositionArray;
const newToastInfo = { ...prev, ...temp };
return newToastInfo;
}
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9840b99e371a10a7643a3a7b4b251dbcd83374de
|
src/components/composites/Toast/Toast.tsx
|
const [themeProps] = useState(usePropsResolution('Toast', {}));
|
<mask> const [toastInfo, setToastInfo] = useState<IToastInfo>({});
<mask> const [visibleToasts, setVisibleToasts] = useState<
<mask> { [key in string]: boolean }
<mask> >({});
<mask> const themeProps = usePropsResolution('Toast', {});
<mask> const { colorMode } = useColorMode();
<mask> let toastIndex = React.useRef(1);
<mask>
<mask> const hideAll = () => {
<mask> setVisibleToasts({});
</s> feat: performance fixes in toast provider and fixes in hybrid provider </s> remove { [key in string]: boolean }
</s> add {
[key in string]: boolean;
} </s> remove let toastIndex = React.useRef(1);
</s> add const toastIndex = React.useRef(1); </s> remove const hideAll = () => {
</s> add const hideAll = React.useCallback(() => { </s> remove };
const hideToast = (id: any) => {
setVisibleToasts((prevVisibleToasts) => ({
...prevVisibleToasts,
[id]: false,
}));
};
</s> add }, [setVisibleToasts]);
const hideToast = React.useCallback(
(id: any) => {
setVisibleToasts((prevVisibleToasts) => ({
...prevVisibleToasts,
[id]: false,
}));
},
[setVisibleToasts]
); </s> remove const removeToast = (id: any) => {
setToastInfo((prev) => {
for (let toastPosition of Object.keys(prev)) {
// @ts-ignore
let positionArray: Array<IToast> = prev[toastPosition];
const isToastPresent =
positionArray.findIndex((toastData) => toastData.id === id) > -1;
if (isToastPresent) {
let newPositionArray = positionArray.filter((item) => item.id !== id);
let temp: any = {};
temp[toastPosition] = newPositionArray;
let newToastInfo = { ...prev, ...temp };
return newToastInfo;
</s> add const removeToast = React.useCallback(
(id: any) => {
setToastInfo((prev) => {
for (const toastPosition of Object.keys(prev)) {
const positionArray: Array<IToast> = prev[toastPosition];
const isToastPresent =
positionArray.findIndex((toastData) => toastData.id === id) > -1;
if (isToastPresent) {
const newPositionArray = positionArray.filter(
(item) => item.id !== id
);
const temp: any = {};
temp[toastPosition] = newPositionArray;
const newToastInfo = { ...prev, ...temp };
return newToastInfo;
}
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9840b99e371a10a7643a3a7b4b251dbcd83374de
|
src/components/composites/Toast/Toast.tsx
|
const toastIndex = React.useRef(1);
|
<mask> { [key in string]: boolean }
<mask> >({});
<mask> const themeProps = usePropsResolution('Toast', {});
<mask> const { colorMode } = useColorMode();
<mask> let toastIndex = React.useRef(1);
<mask>
<mask> const hideAll = () => {
<mask> setVisibleToasts({});
<mask> };
<mask>
</s> feat: performance fixes in toast provider and fixes in hybrid provider </s> remove const themeProps = usePropsResolution('Toast', {});
</s> add const [themeProps] = useState(usePropsResolution('Toast', {}));
</s> remove { [key in string]: boolean }
</s> add {
[key in string]: boolean;
} </s> remove const hideAll = () => {
</s> add const hideAll = React.useCallback(() => { </s> remove };
const hideToast = (id: any) => {
setVisibleToasts((prevVisibleToasts) => ({
...prevVisibleToasts,
[id]: false,
}));
};
</s> add }, [setVisibleToasts]);
const hideToast = React.useCallback(
(id: any) => {
setVisibleToasts((prevVisibleToasts) => ({
...prevVisibleToasts,
[id]: false,
}));
},
[setVisibleToasts]
); </s> remove const removeToast = (id: any) => {
setToastInfo((prev) => {
for (let toastPosition of Object.keys(prev)) {
// @ts-ignore
let positionArray: Array<IToast> = prev[toastPosition];
const isToastPresent =
positionArray.findIndex((toastData) => toastData.id === id) > -1;
if (isToastPresent) {
let newPositionArray = positionArray.filter((item) => item.id !== id);
let temp: any = {};
temp[toastPosition] = newPositionArray;
let newToastInfo = { ...prev, ...temp };
return newToastInfo;
</s> add const removeToast = React.useCallback(
(id: any) => {
setToastInfo((prev) => {
for (const toastPosition of Object.keys(prev)) {
const positionArray: Array<IToast> = prev[toastPosition];
const isToastPresent =
positionArray.findIndex((toastData) => toastData.id === id) > -1;
if (isToastPresent) {
const newPositionArray = positionArray.filter(
(item) => item.id !== id
);
const temp: any = {};
temp[toastPosition] = newPositionArray;
const newToastInfo = { ...prev, ...temp };
return newToastInfo;
}
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9840b99e371a10a7643a3a7b4b251dbcd83374de
|
src/components/composites/Toast/Toast.tsx
|
const hideAll = React.useCallback(() => {
|
<mask> const themeProps = usePropsResolution('Toast', {});
<mask> const { colorMode } = useColorMode();
<mask> let toastIndex = React.useRef(1);
<mask>
<mask> const hideAll = () => {
<mask> setVisibleToasts({});
<mask> };
<mask>
<mask> const hideToast = (id: any) => {
<mask> setVisibleToasts((prevVisibleToasts) => ({
</s> feat: performance fixes in toast provider and fixes in hybrid provider </s> remove };
const hideToast = (id: any) => {
setVisibleToasts((prevVisibleToasts) => ({
...prevVisibleToasts,
[id]: false,
}));
};
</s> add }, [setVisibleToasts]);
const hideToast = React.useCallback(
(id: any) => {
setVisibleToasts((prevVisibleToasts) => ({
...prevVisibleToasts,
[id]: false,
}));
},
[setVisibleToasts]
); </s> remove let toastIndex = React.useRef(1);
</s> add const toastIndex = React.useRef(1); </s> remove const themeProps = usePropsResolution('Toast', {});
</s> add const [themeProps] = useState(usePropsResolution('Toast', {}));
</s> remove { [key in string]: boolean }
</s> add {
[key in string]: boolean;
} </s> remove const isActive = (id: any) => {
for (let toastPosition of Object.keys(toastInfo)) {
// @ts-ignore
let positionArray: Array<IToast> = toastInfo[toastPosition];
return positionArray.findIndex((toastData) => toastData.id === id) > -1;
}
</s> add const isActive = React.useCallback(
(id: any) => {
for (const toastPosition of Object.keys(toastInfo)) {
const positionArray: Array<IToast> = toastInfo[toastPosition];
return positionArray.findIndex((toastData) => toastData.id === id) > -1;
}
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9840b99e371a10a7643a3a7b4b251dbcd83374de
|
src/components/composites/Toast/Toast.tsx
|
}, [setVisibleToasts]);
const hideToast = React.useCallback(
(id: any) => {
setVisibleToasts((prevVisibleToasts) => ({
...prevVisibleToasts,
[id]: false,
}));
},
[setVisibleToasts]
);
|
<mask> let toastIndex = React.useRef(1);
<mask>
<mask> const hideAll = () => {
<mask> setVisibleToasts({});
<mask> };
<mask>
<mask> const hideToast = (id: any) => {
<mask> setVisibleToasts((prevVisibleToasts) => ({
<mask> ...prevVisibleToasts,
<mask> [id]: false,
<mask> }));
<mask> };
<mask>
<mask> const isActive = (id: any) => {
<mask> for (let toastPosition of Object.keys(toastInfo)) {
<mask> // @ts-ignore
<mask> let positionArray: Array<IToast> = toastInfo[toastPosition];
</s> feat: performance fixes in toast provider and fixes in hybrid provider </s> remove const isActive = (id: any) => {
for (let toastPosition of Object.keys(toastInfo)) {
// @ts-ignore
let positionArray: Array<IToast> = toastInfo[toastPosition];
return positionArray.findIndex((toastData) => toastData.id === id) > -1;
}
</s> add const isActive = React.useCallback(
(id: any) => {
for (const toastPosition of Object.keys(toastInfo)) {
const positionArray: Array<IToast> = toastInfo[toastPosition];
return positionArray.findIndex((toastData) => toastData.id === id) > -1;
} </s> remove const hideAll = () => {
</s> add const hideAll = React.useCallback(() => { </s> remove return false;
};
</s> add return false;
},
[toastInfo]
); </s> remove const removeToast = (id: any) => {
setToastInfo((prev) => {
for (let toastPosition of Object.keys(prev)) {
// @ts-ignore
let positionArray: Array<IToast> = prev[toastPosition];
const isToastPresent =
positionArray.findIndex((toastData) => toastData.id === id) > -1;
if (isToastPresent) {
let newPositionArray = positionArray.filter((item) => item.id !== id);
let temp: any = {};
temp[toastPosition] = newPositionArray;
let newToastInfo = { ...prev, ...temp };
return newToastInfo;
</s> add const removeToast = React.useCallback(
(id: any) => {
setToastInfo((prev) => {
for (const toastPosition of Object.keys(prev)) {
const positionArray: Array<IToast> = prev[toastPosition];
const isToastPresent =
positionArray.findIndex((toastData) => toastData.id === id) > -1;
if (isToastPresent) {
const newPositionArray = positionArray.filter(
(item) => item.id !== id
);
const temp: any = {};
temp[toastPosition] = newPositionArray;
const newToastInfo = { ...prev, ...temp };
return newToastInfo;
} </s> remove let toastIndex = React.useRef(1);
</s> add const toastIndex = React.useRef(1);
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9840b99e371a10a7643a3a7b4b251dbcd83374de
|
src/components/composites/Toast/Toast.tsx
|
const isActive = React.useCallback(
(id: any) => {
for (const toastPosition of Object.keys(toastInfo)) {
const positionArray: Array<IToast> = toastInfo[toastPosition];
return positionArray.findIndex((toastData) => toastData.id === id) > -1;
}
|
<mask> [id]: false,
<mask> }));
<mask> };
<mask>
<mask> const isActive = (id: any) => {
<mask> for (let toastPosition of Object.keys(toastInfo)) {
<mask> // @ts-ignore
<mask> let positionArray: Array<IToast> = toastInfo[toastPosition];
<mask> return positionArray.findIndex((toastData) => toastData.id === id) > -1;
<mask> }
<mask>
<mask> return false;
<mask> };
<mask>
<mask> const removeToast = (id: any) => {
</s> feat: performance fixes in toast provider and fixes in hybrid provider </s> remove return false;
};
</s> add return false;
},
[toastInfo]
); </s> remove };
const hideToast = (id: any) => {
setVisibleToasts((prevVisibleToasts) => ({
...prevVisibleToasts,
[id]: false,
}));
};
</s> add }, [setVisibleToasts]);
const hideToast = React.useCallback(
(id: any) => {
setVisibleToasts((prevVisibleToasts) => ({
...prevVisibleToasts,
[id]: false,
}));
},
[setVisibleToasts]
); </s> remove const removeToast = (id: any) => {
setToastInfo((prev) => {
for (let toastPosition of Object.keys(prev)) {
// @ts-ignore
let positionArray: Array<IToast> = prev[toastPosition];
const isToastPresent =
positionArray.findIndex((toastData) => toastData.id === id) > -1;
if (isToastPresent) {
let newPositionArray = positionArray.filter((item) => item.id !== id);
let temp: any = {};
temp[toastPosition] = newPositionArray;
let newToastInfo = { ...prev, ...temp };
return newToastInfo;
</s> add const removeToast = React.useCallback(
(id: any) => {
setToastInfo((prev) => {
for (const toastPosition of Object.keys(prev)) {
const positionArray: Array<IToast> = prev[toastPosition];
const isToastPresent =
positionArray.findIndex((toastData) => toastData.id === id) > -1;
if (isToastPresent) {
const newPositionArray = positionArray.filter(
(item) => item.id !== id
);
const temp: any = {};
temp[toastPosition] = newPositionArray;
const newToastInfo = { ...prev, ...temp };
return newToastInfo;
} </s> remove const hideAll = () => {
</s> add const hideAll = React.useCallback(() => { </s> remove const [contextValue] = useState({
colorMode: {
colorMode,
toggleColorMode,
setColorMode,
accessibleColors,
setAccessibleColors,
},
});
</s> add const contextValue = useMemo(() => {
return {
colorMode: {
colorMode,
toggleColorMode,
setColorMode,
accessibleColors,
setAccessibleColors,
},
};
}, [
colorMode,
toggleColorMode,
setColorMode,
accessibleColors,
setAccessibleColors,
]);
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9840b99e371a10a7643a3a7b4b251dbcd83374de
|
src/components/composites/Toast/Toast.tsx
|
return false;
},
[toastInfo]
);
|
<mask> let positionArray: Array<IToast> = toastInfo[toastPosition];
<mask> return positionArray.findIndex((toastData) => toastData.id === id) > -1;
<mask> }
<mask>
<mask> return false;
<mask> };
<mask>
<mask> const removeToast = (id: any) => {
<mask> setToastInfo((prev) => {
<mask> for (let toastPosition of Object.keys(prev)) {
<mask> // @ts-ignore
</s> feat: performance fixes in toast provider and fixes in hybrid provider </s> remove const isActive = (id: any) => {
for (let toastPosition of Object.keys(toastInfo)) {
// @ts-ignore
let positionArray: Array<IToast> = toastInfo[toastPosition];
return positionArray.findIndex((toastData) => toastData.id === id) > -1;
}
</s> add const isActive = React.useCallback(
(id: any) => {
for (const toastPosition of Object.keys(toastInfo)) {
const positionArray: Array<IToast> = toastInfo[toastPosition];
return positionArray.findIndex((toastData) => toastData.id === id) > -1;
} </s> remove const removeToast = (id: any) => {
setToastInfo((prev) => {
for (let toastPosition of Object.keys(prev)) {
// @ts-ignore
let positionArray: Array<IToast> = prev[toastPosition];
const isToastPresent =
positionArray.findIndex((toastData) => toastData.id === id) > -1;
if (isToastPresent) {
let newPositionArray = positionArray.filter((item) => item.id !== id);
let temp: any = {};
temp[toastPosition] = newPositionArray;
let newToastInfo = { ...prev, ...temp };
return newToastInfo;
</s> add const removeToast = React.useCallback(
(id: any) => {
setToastInfo((prev) => {
for (const toastPosition of Object.keys(prev)) {
const positionArray: Array<IToast> = prev[toastPosition];
const isToastPresent =
positionArray.findIndex((toastData) => toastData.id === id) > -1;
if (isToastPresent) {
const newPositionArray = positionArray.filter(
(item) => item.id !== id
);
const temp: any = {};
temp[toastPosition] = newPositionArray;
const newToastInfo = { ...prev, ...temp };
return newToastInfo;
} </s> remove };
const hideToast = (id: any) => {
setVisibleToasts((prevVisibleToasts) => ({
...prevVisibleToasts,
[id]: false,
}));
};
</s> add }, [setVisibleToasts]);
const hideToast = React.useCallback(
(id: any) => {
setVisibleToasts((prevVisibleToasts) => ({
...prevVisibleToasts,
[id]: false,
}));
},
[setVisibleToasts]
); </s> remove const hideAll = () => {
</s> add const hideAll = React.useCallback(() => { </s> remove const [contextValue] = useState({
colorMode: {
colorMode,
toggleColorMode,
setColorMode,
accessibleColors,
setAccessibleColors,
},
});
</s> add const contextValue = useMemo(() => {
return {
colorMode: {
colorMode,
toggleColorMode,
setColorMode,
accessibleColors,
setAccessibleColors,
},
};
}, [
colorMode,
toggleColorMode,
setColorMode,
accessibleColors,
setAccessibleColors,
]);
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9840b99e371a10a7643a3a7b4b251dbcd83374de
|
src/components/composites/Toast/Toast.tsx
|
const removeToast = React.useCallback(
(id: any) => {
setToastInfo((prev) => {
for (const toastPosition of Object.keys(prev)) {
const positionArray: Array<IToast> = prev[toastPosition];
const isToastPresent =
positionArray.findIndex((toastData) => toastData.id === id) > -1;
if (isToastPresent) {
const newPositionArray = positionArray.filter(
(item) => item.id !== id
);
const temp: any = {};
temp[toastPosition] = newPositionArray;
const newToastInfo = { ...prev, ...temp };
return newToastInfo;
}
|
<mask>
<mask> return false;
<mask> };
<mask>
<mask> const removeToast = (id: any) => {
<mask> setToastInfo((prev) => {
<mask> for (let toastPosition of Object.keys(prev)) {
<mask> // @ts-ignore
<mask> let positionArray: Array<IToast> = prev[toastPosition];
<mask> const isToastPresent =
<mask> positionArray.findIndex((toastData) => toastData.id === id) > -1;
<mask>
<mask> if (isToastPresent) {
<mask> let newPositionArray = positionArray.filter((item) => item.id !== id);
<mask> let temp: any = {};
<mask> temp[toastPosition] = newPositionArray;
<mask>
<mask> let newToastInfo = { ...prev, ...temp };
<mask> return newToastInfo;
<mask> }
<mask> }
<mask>
<mask> return prev;
<mask> });
</s> feat: performance fixes in toast provider and fixes in hybrid provider </s> remove return false;
};
</s> add return false;
},
[toastInfo]
); </s> remove const isActive = (id: any) => {
for (let toastPosition of Object.keys(toastInfo)) {
// @ts-ignore
let positionArray: Array<IToast> = toastInfo[toastPosition];
return positionArray.findIndex((toastData) => toastData.id === id) > -1;
}
</s> add const isActive = React.useCallback(
(id: any) => {
for (const toastPosition of Object.keys(toastInfo)) {
const positionArray: Array<IToast> = toastInfo[toastPosition];
return positionArray.findIndex((toastData) => toastData.id === id) > -1;
} </s> remove };
const hideToast = (id: any) => {
setVisibleToasts((prevVisibleToasts) => ({
...prevVisibleToasts,
[id]: false,
}));
};
</s> add }, [setVisibleToasts]);
const hideToast = React.useCallback(
(id: any) => {
setVisibleToasts((prevVisibleToasts) => ({
...prevVisibleToasts,
[id]: false,
}));
},
[setVisibleToasts]
); </s> remove }
</s> add </s> remove const hideAll = () => {
</s> add const hideAll = React.useCallback(() => {
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9840b99e371a10a7643a3a7b4b251dbcd83374de
|
src/components/composites/Toast/Toast.tsx
|
<mask>
<mask> let newToastInfo = { ...prev, ...temp };
<mask> return newToastInfo;
<mask> }
<mask> }
<mask>
<mask> return prev;
<mask> });
<mask> };
<mask>
</s> feat: performance fixes in toast provider and fixes in hybrid provider </s> remove const removeToast = (id: any) => {
setToastInfo((prev) => {
for (let toastPosition of Object.keys(prev)) {
// @ts-ignore
let positionArray: Array<IToast> = prev[toastPosition];
const isToastPresent =
positionArray.findIndex((toastData) => toastData.id === id) > -1;
if (isToastPresent) {
let newPositionArray = positionArray.filter((item) => item.id !== id);
let temp: any = {};
temp[toastPosition] = newPositionArray;
let newToastInfo = { ...prev, ...temp };
return newToastInfo;
</s> add const removeToast = React.useCallback(
(id: any) => {
setToastInfo((prev) => {
for (const toastPosition of Object.keys(prev)) {
const positionArray: Array<IToast> = prev[toastPosition];
const isToastPresent =
positionArray.findIndex((toastData) => toastData.id === id) > -1;
if (isToastPresent) {
const newPositionArray = positionArray.filter(
(item) => item.id !== id
);
const temp: any = {};
temp[toastPosition] = newPositionArray;
const newToastInfo = { ...prev, ...temp };
return newToastInfo;
} </s> remove return prev;
});
};
</s> add return prev;
});
},
[setToastInfo]
); </s> remove const getTextColor = (
variant:
| 'solid'
| 'left-accent'
| 'top-accent'
| 'outline'
| 'subtle'
| 'outline-light'
| any
): any => {
switch (variant) {
case 'left-accent':
case 'top-accent':
case 'subtle':
return 'coolGray.800';
case 'solid':
return 'warmGray.50';
case 'outline':
case 'outline-light':
return colorMode === 'light' ? 'coolGray.800' : 'warmGray.50';
default:
return 'black';
}
};
</s> add const getTextColor = React.useCallback(
(
variant:
| 'solid'
| 'left-accent'
| 'top-accent'
| 'outline'
| 'subtle'
| 'outline-light'
| any
): any => {
switch (variant) {
case 'left-accent':
case 'top-accent':
case 'subtle':
return 'coolGray.800';
case 'solid':
return 'warmGray.50';
case 'outline':
case 'outline-light':
return colorMode === 'light' ? 'coolGray.800' : 'warmGray.50';
default:
return 'black';
}
},
[colorMode]
); </s> remove const isActive = (id: any) => {
for (let toastPosition of Object.keys(toastInfo)) {
// @ts-ignore
let positionArray: Array<IToast> = toastInfo[toastPosition];
return positionArray.findIndex((toastData) => toastData.id === id) > -1;
}
</s> add const isActive = React.useCallback(
(id: any) => {
for (const toastPosition of Object.keys(toastInfo)) {
const positionArray: Array<IToast> = toastInfo[toastPosition];
return positionArray.findIndex((toastData) => toastData.id === id) > -1;
} </s> remove return false;
};
</s> add return false;
},
[toastInfo]
);
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9840b99e371a10a7643a3a7b4b251dbcd83374de
|
src/components/composites/Toast/Toast.tsx
|
|
return prev;
});
},
[setToastInfo]
);
|
<mask> return newToastInfo;
<mask> }
<mask> }
<mask>
<mask> return prev;
<mask> });
<mask> };
<mask>
<mask> const getTextColor = (
<mask> variant:
<mask> | 'solid'
<mask> | 'left-accent'
</s> feat: performance fixes in toast provider and fixes in hybrid provider </s> remove const getTextColor = (
variant:
| 'solid'
| 'left-accent'
| 'top-accent'
| 'outline'
| 'subtle'
| 'outline-light'
| any
): any => {
switch (variant) {
case 'left-accent':
case 'top-accent':
case 'subtle':
return 'coolGray.800';
case 'solid':
return 'warmGray.50';
case 'outline':
case 'outline-light':
return colorMode === 'light' ? 'coolGray.800' : 'warmGray.50';
default:
return 'black';
}
};
</s> add const getTextColor = React.useCallback(
(
variant:
| 'solid'
| 'left-accent'
| 'top-accent'
| 'outline'
| 'subtle'
| 'outline-light'
| any
): any => {
switch (variant) {
case 'left-accent':
case 'top-accent':
case 'subtle':
return 'coolGray.800';
case 'solid':
return 'warmGray.50';
case 'outline':
case 'outline-light':
return colorMode === 'light' ? 'coolGray.800' : 'warmGray.50';
default:
return 'black';
}
},
[colorMode]
); </s> remove }
</s> add </s> remove const removeToast = (id: any) => {
setToastInfo((prev) => {
for (let toastPosition of Object.keys(prev)) {
// @ts-ignore
let positionArray: Array<IToast> = prev[toastPosition];
const isToastPresent =
positionArray.findIndex((toastData) => toastData.id === id) > -1;
if (isToastPresent) {
let newPositionArray = positionArray.filter((item) => item.id !== id);
let temp: any = {};
temp[toastPosition] = newPositionArray;
let newToastInfo = { ...prev, ...temp };
return newToastInfo;
</s> add const removeToast = React.useCallback(
(id: any) => {
setToastInfo((prev) => {
for (const toastPosition of Object.keys(prev)) {
const positionArray: Array<IToast> = prev[toastPosition];
const isToastPresent =
positionArray.findIndex((toastData) => toastData.id === id) > -1;
if (isToastPresent) {
const newPositionArray = positionArray.filter(
(item) => item.id !== id
);
const temp: any = {};
temp[toastPosition] = newPositionArray;
const newToastInfo = { ...prev, ...temp };
return newToastInfo;
} </s> remove const isActive = (id: any) => {
for (let toastPosition of Object.keys(toastInfo)) {
// @ts-ignore
let positionArray: Array<IToast> = toastInfo[toastPosition];
return positionArray.findIndex((toastData) => toastData.id === id) > -1;
}
</s> add const isActive = React.useCallback(
(id: any) => {
for (const toastPosition of Object.keys(toastInfo)) {
const positionArray: Array<IToast> = toastInfo[toastPosition];
return positionArray.findIndex((toastData) => toastData.id === id) > -1;
} </s> remove return id;
};
</s> add return id;
},
[getTextColor, themeProps, toastInfo, visibleToasts, hideToast]
);
const contextValue = React.useMemo(() => {
return {
toastInfo,
setToastInfo,
setToast,
removeToast,
hideAll,
isActive,
visibleToasts,
setVisibleToasts,
hideToast,
};
}, [
toastInfo,
setToastInfo,
setToast,
removeToast,
hideAll,
isActive,
visibleToasts,
setVisibleToasts,
hideToast,
]);
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9840b99e371a10a7643a3a7b4b251dbcd83374de
|
src/components/composites/Toast/Toast.tsx
|
const getTextColor = React.useCallback(
(
variant:
| 'solid'
| 'left-accent'
| 'top-accent'
| 'outline'
| 'subtle'
| 'outline-light'
| any
): any => {
switch (variant) {
case 'left-accent':
case 'top-accent':
case 'subtle':
return 'coolGray.800';
case 'solid':
return 'warmGray.50';
case 'outline':
case 'outline-light':
return colorMode === 'light' ? 'coolGray.800' : 'warmGray.50';
default:
return 'black';
}
},
[colorMode]
);
|
<mask> return prev;
<mask> });
<mask> };
<mask>
<mask> const getTextColor = (
<mask> variant:
<mask> | 'solid'
<mask> | 'left-accent'
<mask> | 'top-accent'
<mask> | 'outline'
<mask> | 'subtle'
<mask> | 'outline-light'
<mask> | any
<mask> ): any => {
<mask> switch (variant) {
<mask> case 'left-accent':
<mask> case 'top-accent':
<mask> case 'subtle':
<mask> return 'coolGray.800';
<mask> case 'solid':
<mask> return 'warmGray.50';
<mask> case 'outline':
<mask> case 'outline-light':
<mask> return colorMode === 'light' ? 'coolGray.800' : 'warmGray.50';
<mask> default:
<mask> return 'black';
<mask> }
<mask> };
<mask>
<mask> const setToast = (props: IToastProps): number => {
<mask> const {
<mask> placement = 'bottom',
<mask> title,
</s> feat: performance fixes in toast provider and fixes in hybrid provider </s> remove return prev;
});
};
</s> add return prev;
});
},
[setToastInfo]
); </s> remove const setToast = (props: IToastProps): number => {
const {
placement = 'bottom',
title,
render,
status,
id = toastIndex.current++,
description,
isClosable = true,
duration = 5000,
variant,
accessibilityAnnouncement,
accessibilityLiveRegion = 'polite',
...rest
} = props;
let positionToastArray = toastInfo[placement];
if (!positionToastArray) positionToastArray = [];
let component = null;
if (render) {
component = render({ id });
} else if (!status && !variant) {
component = (
<VStack space={title && description ? 1 : 0} {...themeProps} {...rest}>
<Box _text={themeProps._title}>{title}</Box>
{description && (
<Box _text={themeProps._description}>{description}</Box>
)}
</VStack>
);
} else if (status || variant) {
component = (
<Alert
maxWidth="100%"
alignSelf="center"
status={status ?? 'info'}
variant={variant as any}
accessibilityLiveRegion={accessibilityLiveRegion}
{...rest}
>
<VStack space={1} flexShrink={1} w="100%">
<HStack
flexShrink={1}
space={2}
alignItems="center"
justifyContent="space-between"
>
<HStack space={2} flexShrink={1} alignItems="center">
<Alert.Icon />
<Text
fontSize="md"
fontWeight="medium"
color={getTextColor(variant ?? 'subtle')}
>
{title}
</Text>
</HStack>
{isClosable ? (
<IconButton
variant="unstyled"
icon={
<CloseIcon
size="3"
color={getTextColor(variant ?? 'subtle')}
/>
}
onPress={() => hideToast(id)}
/>
) : null}
</HStack>
<Box
px="6"
// @ts-ignore
_text={{
color: getTextColor(variant ?? 'subtle'),
}}
>
{description}
</Box>
</s> add const setToast = React.useCallback(
(props: IToastProps): number => {
// console.log("in settoast");
const {
placement = 'bottom',
title,
render,
status,
id = toastIndex.current++,
description,
isClosable = true,
duration = 5000,
variant,
accessibilityAnnouncement,
accessibilityLiveRegion = 'polite',
...rest
} = props;
let positionToastArray = toastInfo[placement];
if (!positionToastArray) positionToastArray = [];
let component = null;
if (render) {
component = render({ id });
} else if (!status && !variant) {
component = (
<VStack
space={title && description ? 1 : 0}
{...themeProps}
{...rest}
>
<Box _text={themeProps._title}>{title}</Box>
{description && (
<Box _text={themeProps._description}>{description}</Box>
)} </s> remove const removeToast = (id: any) => {
setToastInfo((prev) => {
for (let toastPosition of Object.keys(prev)) {
// @ts-ignore
let positionArray: Array<IToast> = prev[toastPosition];
const isToastPresent =
positionArray.findIndex((toastData) => toastData.id === id) > -1;
if (isToastPresent) {
let newPositionArray = positionArray.filter((item) => item.id !== id);
let temp: any = {};
temp[toastPosition] = newPositionArray;
let newToastInfo = { ...prev, ...temp };
return newToastInfo;
</s> add const removeToast = React.useCallback(
(id: any) => {
setToastInfo((prev) => {
for (const toastPosition of Object.keys(prev)) {
const positionArray: Array<IToast> = prev[toastPosition];
const isToastPresent =
positionArray.findIndex((toastData) => toastData.id === id) > -1;
if (isToastPresent) {
const newPositionArray = positionArray.filter(
(item) => item.id !== id
);
const temp: any = {};
temp[toastPosition] = newPositionArray;
const newToastInfo = { ...prev, ...temp };
return newToastInfo;
} </s> remove const [contextValue] = useState({
colorMode: {
colorMode,
toggleColorMode,
setColorMode,
accessibleColors,
setAccessibleColors,
},
});
</s> add const contextValue = useMemo(() => {
return {
colorMode: {
colorMode,
toggleColorMode,
setColorMode,
accessibleColors,
setAccessibleColors,
},
};
}, [
colorMode,
toggleColorMode,
setColorMode,
accessibleColors,
setAccessibleColors,
]); </s> remove const isActive = (id: any) => {
for (let toastPosition of Object.keys(toastInfo)) {
// @ts-ignore
let positionArray: Array<IToast> = toastInfo[toastPosition];
return positionArray.findIndex((toastData) => toastData.id === id) > -1;
}
</s> add const isActive = React.useCallback(
(id: any) => {
for (const toastPosition of Object.keys(toastInfo)) {
const positionArray: Array<IToast> = toastInfo[toastPosition];
return positionArray.findIndex((toastData) => toastData.id === id) > -1;
}
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9840b99e371a10a7643a3a7b4b251dbcd83374de
|
src/components/composites/Toast/Toast.tsx
|
const setToast = React.useCallback(
(props: IToastProps): number => {
// console.log("in settoast");
const {
placement = 'bottom',
title,
render,
status,
id = toastIndex.current++,
description,
isClosable = true,
duration = 5000,
variant,
accessibilityAnnouncement,
accessibilityLiveRegion = 'polite',
...rest
} = props;
let positionToastArray = toastInfo[placement];
if (!positionToastArray) positionToastArray = [];
let component = null;
if (render) {
component = render({ id });
} else if (!status && !variant) {
component = (
<VStack
space={title && description ? 1 : 0}
{...themeProps}
{...rest}
>
<Box _text={themeProps._title}>{title}</Box>
{description && (
<Box _text={themeProps._description}>{description}</Box>
)}
|
<mask> return 'black';
<mask> }
<mask> };
<mask>
<mask> const setToast = (props: IToastProps): number => {
<mask> const {
<mask> placement = 'bottom',
<mask> title,
<mask> render,
<mask> status,
<mask> id = toastIndex.current++,
<mask> description,
<mask> isClosable = true,
<mask> duration = 5000,
<mask> variant,
<mask> accessibilityAnnouncement,
<mask> accessibilityLiveRegion = 'polite',
<mask> ...rest
<mask> } = props;
<mask>
<mask> let positionToastArray = toastInfo[placement];
<mask> if (!positionToastArray) positionToastArray = [];
<mask>
<mask> let component = null;
<mask>
<mask> if (render) {
<mask> component = render({ id });
<mask> } else if (!status && !variant) {
<mask> component = (
<mask> <VStack space={title && description ? 1 : 0} {...themeProps} {...rest}>
<mask> <Box _text={themeProps._title}>{title}</Box>
<mask> {description && (
<mask> <Box _text={themeProps._description}>{description}</Box>
<mask> )}
<mask> </VStack>
<mask> );
<mask> } else if (status || variant) {
<mask> component = (
<mask> <Alert
<mask> maxWidth="100%"
<mask> alignSelf="center"
<mask> status={status ?? 'info'}
<mask> variant={variant as any}
<mask> accessibilityLiveRegion={accessibilityLiveRegion}
<mask> {...rest}
<mask> >
<mask> <VStack space={1} flexShrink={1} w="100%">
<mask> <HStack
<mask> flexShrink={1}
<mask> space={2}
<mask> alignItems="center"
<mask> justifyContent="space-between"
<mask> >
<mask> <HStack space={2} flexShrink={1} alignItems="center">
<mask> <Alert.Icon />
<mask> <Text
<mask> fontSize="md"
<mask> fontWeight="medium"
<mask> color={getTextColor(variant ?? 'subtle')}
<mask> >
<mask> {title}
<mask> </Text>
<mask> </HStack>
<mask> {isClosable ? (
<mask> <IconButton
<mask> variant="unstyled"
<mask> icon={
<mask> <CloseIcon
<mask> size="3"
<mask> color={getTextColor(variant ?? 'subtle')}
<mask> />
<mask> }
<mask> onPress={() => hideToast(id)}
<mask> />
<mask> ) : null}
<mask> </HStack>
<mask> <Box
<mask> px="6"
<mask> // @ts-ignore
<mask> _text={{
<mask> color: getTextColor(variant ?? 'subtle'),
<mask> }}
<mask> >
<mask> {description}
<mask> </Box>
<mask> </VStack>
<mask> </Alert>
<mask> );
<mask> }
<mask>
</s> feat: performance fixes in toast provider and fixes in hybrid provider </s> remove </Alert>
);
}
</s> add );
} else if (status || variant) {
component = (
<Alert
maxWidth="100%"
alignSelf="center"
status={status ?? 'info'}
variant={variant as any}
accessibilityLiveRegion={accessibilityLiveRegion}
{...rest}
>
<VStack space={1} flexShrink={1} w="100%">
<HStack
flexShrink={1}
space={2}
alignItems="center"
justifyContent="space-between"
>
<HStack space={2} flexShrink={1} alignItems="center">
<Alert.Icon />
<Text
fontSize="md"
fontWeight="medium"
color={getTextColor(variant ?? 'subtle')}
>
{title}
</Text>
</HStack>
{isClosable ? (
<IconButton
variant="unstyled"
icon={
<CloseIcon
size="3"
color={getTextColor(variant ?? 'subtle')}
/>
}
onPress={() => hideToast(id)}
/>
) : null}
</HStack>
<Box
px="6"
// @ts-ignore
_text={{
color: getTextColor(variant ?? 'subtle'),
}}
>
{description}
</Box>
</VStack>
</Alert>
);
} </s> remove const getTextColor = (
variant:
| 'solid'
| 'left-accent'
| 'top-accent'
| 'outline'
| 'subtle'
| 'outline-light'
| any
): any => {
switch (variant) {
case 'left-accent':
case 'top-accent':
case 'subtle':
return 'coolGray.800';
case 'solid':
return 'warmGray.50';
case 'outline':
case 'outline-light':
return colorMode === 'light' ? 'coolGray.800' : 'warmGray.50';
default:
return 'black';
}
};
</s> add const getTextColor = React.useCallback(
(
variant:
| 'solid'
| 'left-accent'
| 'top-accent'
| 'outline'
| 'subtle'
| 'outline-light'
| any
): any => {
switch (variant) {
case 'left-accent':
case 'top-accent':
case 'subtle':
return 'coolGray.800';
case 'solid':
return 'warmGray.50';
case 'outline':
case 'outline-light':
return colorMode === 'light' ? 'coolGray.800' : 'warmGray.50';
default:
return 'black';
}
},
[colorMode]
); </s> remove const removeToast = (id: any) => {
setToastInfo((prev) => {
for (let toastPosition of Object.keys(prev)) {
// @ts-ignore
let positionArray: Array<IToast> = prev[toastPosition];
const isToastPresent =
positionArray.findIndex((toastData) => toastData.id === id) > -1;
if (isToastPresent) {
let newPositionArray = positionArray.filter((item) => item.id !== id);
let temp: any = {};
temp[toastPosition] = newPositionArray;
let newToastInfo = { ...prev, ...temp };
return newToastInfo;
</s> add const removeToast = React.useCallback(
(id: any) => {
setToastInfo((prev) => {
for (const toastPosition of Object.keys(prev)) {
const positionArray: Array<IToast> = prev[toastPosition];
const isToastPresent =
positionArray.findIndex((toastData) => toastData.id === id) > -1;
if (isToastPresent) {
const newPositionArray = positionArray.filter(
(item) => item.id !== id
);
const temp: any = {};
temp[toastPosition] = newPositionArray;
const newToastInfo = { ...prev, ...temp };
return newToastInfo;
} </s> remove const isActive = (id: any) => {
for (let toastPosition of Object.keys(toastInfo)) {
// @ts-ignore
let positionArray: Array<IToast> = toastInfo[toastPosition];
return positionArray.findIndex((toastData) => toastData.id === id) > -1;
}
</s> add const isActive = React.useCallback(
(id: any) => {
for (const toastPosition of Object.keys(toastInfo)) {
const positionArray: Array<IToast> = toastInfo[toastPosition];
return positionArray.findIndex((toastData) => toastData.id === id) > -1;
} </s> remove return false;
};
</s> add return false;
},
[toastInfo]
);
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9840b99e371a10a7643a3a7b4b251dbcd83374de
|
src/components/composites/Toast/Toast.tsx
|
);
} else if (status || variant) {
component = (
<Alert
maxWidth="100%"
alignSelf="center"
status={status ?? 'info'}
variant={variant as any}
accessibilityLiveRegion={accessibilityLiveRegion}
{...rest}
>
<VStack space={1} flexShrink={1} w="100%">
<HStack
flexShrink={1}
space={2}
alignItems="center"
justifyContent="space-between"
>
<HStack space={2} flexShrink={1} alignItems="center">
<Alert.Icon />
<Text
fontSize="md"
fontWeight="medium"
color={getTextColor(variant ?? 'subtle')}
>
{title}
</Text>
</HStack>
{isClosable ? (
<IconButton
variant="unstyled"
icon={
<CloseIcon
size="3"
color={getTextColor(variant ?? 'subtle')}
/>
}
onPress={() => hideToast(id)}
/>
) : null}
</HStack>
<Box
px="6"
// @ts-ignore
_text={{
color: getTextColor(variant ?? 'subtle'),
}}
>
{description}
</Box>
</VStack>
</Alert>
);
}
|
<mask> >
<mask> {description}
<mask> </Box>
<mask> </VStack>
<mask> </Alert>
<mask> );
<mask> }
<mask>
<mask> toastInfo[placement] = [
<mask> ...positionToastArray,
<mask> { component, id, config: props },
<mask> ];
</s> feat: performance fixes in toast provider and fixes in hybrid provider </s> remove toastInfo[placement] = [
...positionToastArray,
{ component, id, config: props },
];
</s> add toastInfo[placement] = [
...positionToastArray,
{ component, id, config: props },
]; </s> remove setToastInfo({ ...toastInfo });
</s> add setToastInfo({ ...toastInfo }); </s> remove const setToast = (props: IToastProps): number => {
const {
placement = 'bottom',
title,
render,
status,
id = toastIndex.current++,
description,
isClosable = true,
duration = 5000,
variant,
accessibilityAnnouncement,
accessibilityLiveRegion = 'polite',
...rest
} = props;
let positionToastArray = toastInfo[placement];
if (!positionToastArray) positionToastArray = [];
let component = null;
if (render) {
component = render({ id });
} else if (!status && !variant) {
component = (
<VStack space={title && description ? 1 : 0} {...themeProps} {...rest}>
<Box _text={themeProps._title}>{title}</Box>
{description && (
<Box _text={themeProps._description}>{description}</Box>
)}
</VStack>
);
} else if (status || variant) {
component = (
<Alert
maxWidth="100%"
alignSelf="center"
status={status ?? 'info'}
variant={variant as any}
accessibilityLiveRegion={accessibilityLiveRegion}
{...rest}
>
<VStack space={1} flexShrink={1} w="100%">
<HStack
flexShrink={1}
space={2}
alignItems="center"
justifyContent="space-between"
>
<HStack space={2} flexShrink={1} alignItems="center">
<Alert.Icon />
<Text
fontSize="md"
fontWeight="medium"
color={getTextColor(variant ?? 'subtle')}
>
{title}
</Text>
</HStack>
{isClosable ? (
<IconButton
variant="unstyled"
icon={
<CloseIcon
size="3"
color={getTextColor(variant ?? 'subtle')}
/>
}
onPress={() => hideToast(id)}
/>
) : null}
</HStack>
<Box
px="6"
// @ts-ignore
_text={{
color: getTextColor(variant ?? 'subtle'),
}}
>
{description}
</Box>
</s> add const setToast = React.useCallback(
(props: IToastProps): number => {
// console.log("in settoast");
const {
placement = 'bottom',
title,
render,
status,
id = toastIndex.current++,
description,
isClosable = true,
duration = 5000,
variant,
accessibilityAnnouncement,
accessibilityLiveRegion = 'polite',
...rest
} = props;
let positionToastArray = toastInfo[placement];
if (!positionToastArray) positionToastArray = [];
let component = null;
if (render) {
component = render({ id });
} else if (!status && !variant) {
component = (
<VStack
space={title && description ? 1 : 0}
{...themeProps}
{...rest}
>
<Box _text={themeProps._title}>{title}</Box>
{description && (
<Box _text={themeProps._description}>{description}</Box>
)} </s> remove const [contextValue] = useState({
colorMode: {
colorMode,
toggleColorMode,
setColorMode,
accessibleColors,
setAccessibleColors,
},
});
</s> add const contextValue = useMemo(() => {
return {
colorMode: {
colorMode,
toggleColorMode,
setColorMode,
accessibleColors,
setAccessibleColors,
},
};
}, [
colorMode,
toggleColorMode,
setColorMode,
accessibleColors,
setAccessibleColors,
]); </s> remove return id;
};
</s> add return id;
},
[getTextColor, themeProps, toastInfo, visibleToasts, hideToast]
);
const contextValue = React.useMemo(() => {
return {
toastInfo,
setToastInfo,
setToast,
removeToast,
hideAll,
isActive,
visibleToasts,
setVisibleToasts,
hideToast,
};
}, [
toastInfo,
setToastInfo,
setToast,
removeToast,
hideAll,
isActive,
visibleToasts,
setVisibleToasts,
hideToast,
]);
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9840b99e371a10a7643a3a7b4b251dbcd83374de
|
src/components/composites/Toast/Toast.tsx
|
toastInfo[placement] = [
...positionToastArray,
{ component, id, config: props },
];
|
<mask> </Alert>
<mask> );
<mask> }
<mask>
<mask> toastInfo[placement] = [
<mask> ...positionToastArray,
<mask> { component, id, config: props },
<mask> ];
<mask>
<mask> setToastInfo({ ...toastInfo });
<mask>
<mask> setVisibleToasts({ ...visibleToasts, [id]: true });
<mask> if (duration !== null) {
</s> feat: performance fixes in toast provider and fixes in hybrid provider </s> remove setToastInfo({ ...toastInfo });
</s> add setToastInfo({ ...toastInfo }); </s> remove setVisibleToasts({ ...visibleToasts, [id]: true });
if (duration !== null) {
setTimeout(function () {
hideToast(id);
}, duration);
}
</s> add setVisibleToasts({ ...visibleToasts, [id]: true });
if (duration !== null) {
setTimeout(function () {
hideToast(id);
}, duration);
} </s> remove </Alert>
);
}
</s> add );
} else if (status || variant) {
component = (
<Alert
maxWidth="100%"
alignSelf="center"
status={status ?? 'info'}
variant={variant as any}
accessibilityLiveRegion={accessibilityLiveRegion}
{...rest}
>
<VStack space={1} flexShrink={1} w="100%">
<HStack
flexShrink={1}
space={2}
alignItems="center"
justifyContent="space-between"
>
<HStack space={2} flexShrink={1} alignItems="center">
<Alert.Icon />
<Text
fontSize="md"
fontWeight="medium"
color={getTextColor(variant ?? 'subtle')}
>
{title}
</Text>
</HStack>
{isClosable ? (
<IconButton
variant="unstyled"
icon={
<CloseIcon
size="3"
color={getTextColor(variant ?? 'subtle')}
/>
}
onPress={() => hideToast(id)}
/>
) : null}
</HStack>
<Box
px="6"
// @ts-ignore
_text={{
color: getTextColor(variant ?? 'subtle'),
}}
>
{description}
</Box>
</VStack>
</Alert>
);
} </s> remove const [contextValue] = useState({
colorMode: {
colorMode,
toggleColorMode,
setColorMode,
accessibleColors,
setAccessibleColors,
},
});
</s> add const contextValue = useMemo(() => {
return {
colorMode: {
colorMode,
toggleColorMode,
setColorMode,
accessibleColors,
setAccessibleColors,
},
};
}, [
colorMode,
toggleColorMode,
setColorMode,
accessibleColors,
setAccessibleColors,
]); </s> remove const removeToast = (id: any) => {
setToastInfo((prev) => {
for (let toastPosition of Object.keys(prev)) {
// @ts-ignore
let positionArray: Array<IToast> = prev[toastPosition];
const isToastPresent =
positionArray.findIndex((toastData) => toastData.id === id) > -1;
if (isToastPresent) {
let newPositionArray = positionArray.filter((item) => item.id !== id);
let temp: any = {};
temp[toastPosition] = newPositionArray;
let newToastInfo = { ...prev, ...temp };
return newToastInfo;
</s> add const removeToast = React.useCallback(
(id: any) => {
setToastInfo((prev) => {
for (const toastPosition of Object.keys(prev)) {
const positionArray: Array<IToast> = prev[toastPosition];
const isToastPresent =
positionArray.findIndex((toastData) => toastData.id === id) > -1;
if (isToastPresent) {
const newPositionArray = positionArray.filter(
(item) => item.id !== id
);
const temp: any = {};
temp[toastPosition] = newPositionArray;
const newToastInfo = { ...prev, ...temp };
return newToastInfo;
}
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9840b99e371a10a7643a3a7b4b251dbcd83374de
|
src/components/composites/Toast/Toast.tsx
|
setToastInfo({ ...toastInfo });
|
<mask> ...positionToastArray,
<mask> { component, id, config: props },
<mask> ];
<mask>
<mask> setToastInfo({ ...toastInfo });
<mask>
<mask> setVisibleToasts({ ...visibleToasts, [id]: true });
<mask> if (duration !== null) {
<mask> setTimeout(function () {
<mask> hideToast(id);
</s> feat: performance fixes in toast provider and fixes in hybrid provider </s> remove toastInfo[placement] = [
...positionToastArray,
{ component, id, config: props },
];
</s> add toastInfo[placement] = [
...positionToastArray,
{ component, id, config: props },
]; </s> remove setVisibleToasts({ ...visibleToasts, [id]: true });
if (duration !== null) {
setTimeout(function () {
hideToast(id);
}, duration);
}
</s> add setVisibleToasts({ ...visibleToasts, [id]: true });
if (duration !== null) {
setTimeout(function () {
hideToast(id);
}, duration);
} </s> remove </Alert>
);
}
</s> add );
} else if (status || variant) {
component = (
<Alert
maxWidth="100%"
alignSelf="center"
status={status ?? 'info'}
variant={variant as any}
accessibilityLiveRegion={accessibilityLiveRegion}
{...rest}
>
<VStack space={1} flexShrink={1} w="100%">
<HStack
flexShrink={1}
space={2}
alignItems="center"
justifyContent="space-between"
>
<HStack space={2} flexShrink={1} alignItems="center">
<Alert.Icon />
<Text
fontSize="md"
fontWeight="medium"
color={getTextColor(variant ?? 'subtle')}
>
{title}
</Text>
</HStack>
{isClosable ? (
<IconButton
variant="unstyled"
icon={
<CloseIcon
size="3"
color={getTextColor(variant ?? 'subtle')}
/>
}
onPress={() => hideToast(id)}
/>
) : null}
</HStack>
<Box
px="6"
// @ts-ignore
_text={{
color: getTextColor(variant ?? 'subtle'),
}}
>
{description}
</Box>
</VStack>
</Alert>
);
} </s> remove };
const hideToast = (id: any) => {
setVisibleToasts((prevVisibleToasts) => ({
...prevVisibleToasts,
[id]: false,
}));
};
</s> add }, [setVisibleToasts]);
const hideToast = React.useCallback(
(id: any) => {
setVisibleToasts((prevVisibleToasts) => ({
...prevVisibleToasts,
[id]: false,
}));
},
[setVisibleToasts]
); </s> remove // iOS doesn't support accessibilityLiveRegion
if (accessibilityAnnouncement && Platform.OS === 'ios') {
AccessibilityInfo.announceForAccessibility(accessibilityAnnouncement);
}
</s> add // iOS doesn't support accessibilityLiveRegion
if (accessibilityAnnouncement && Platform.OS === 'ios') {
AccessibilityInfo.announceForAccessibility(accessibilityAnnouncement);
}
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9840b99e371a10a7643a3a7b4b251dbcd83374de
|
src/components/composites/Toast/Toast.tsx
|
setVisibleToasts({ ...visibleToasts, [id]: true });
if (duration !== null) {
setTimeout(function () {
hideToast(id);
}, duration);
}
|
<mask> ];
<mask>
<mask> setToastInfo({ ...toastInfo });
<mask>
<mask> setVisibleToasts({ ...visibleToasts, [id]: true });
<mask> if (duration !== null) {
<mask> setTimeout(function () {
<mask> hideToast(id);
<mask> }, duration);
<mask> }
<mask>
<mask> // iOS doesn't support accessibilityLiveRegion
<mask> if (accessibilityAnnouncement && Platform.OS === 'ios') {
<mask> AccessibilityInfo.announceForAccessibility(accessibilityAnnouncement);
<mask> }
</s> feat: performance fixes in toast provider and fixes in hybrid provider </s> remove // iOS doesn't support accessibilityLiveRegion
if (accessibilityAnnouncement && Platform.OS === 'ios') {
AccessibilityInfo.announceForAccessibility(accessibilityAnnouncement);
}
</s> add // iOS doesn't support accessibilityLiveRegion
if (accessibilityAnnouncement && Platform.OS === 'ios') {
AccessibilityInfo.announceForAccessibility(accessibilityAnnouncement);
} </s> remove setToastInfo({ ...toastInfo });
</s> add setToastInfo({ ...toastInfo }); </s> remove toastInfo[placement] = [
...positionToastArray,
{ component, id, config: props },
];
</s> add toastInfo[placement] = [
...positionToastArray,
{ component, id, config: props },
]; </s> remove return id;
};
</s> add return id;
},
[getTextColor, themeProps, toastInfo, visibleToasts, hideToast]
);
const contextValue = React.useMemo(() => {
return {
toastInfo,
setToastInfo,
setToast,
removeToast,
hideAll,
isActive,
visibleToasts,
setVisibleToasts,
hideToast,
};
}, [
toastInfo,
setToastInfo,
setToast,
removeToast,
hideAll,
isActive,
visibleToasts,
setVisibleToasts,
hideToast,
]); </s> remove const setToast = (props: IToastProps): number => {
const {
placement = 'bottom',
title,
render,
status,
id = toastIndex.current++,
description,
isClosable = true,
duration = 5000,
variant,
accessibilityAnnouncement,
accessibilityLiveRegion = 'polite',
...rest
} = props;
let positionToastArray = toastInfo[placement];
if (!positionToastArray) positionToastArray = [];
let component = null;
if (render) {
component = render({ id });
} else if (!status && !variant) {
component = (
<VStack space={title && description ? 1 : 0} {...themeProps} {...rest}>
<Box _text={themeProps._title}>{title}</Box>
{description && (
<Box _text={themeProps._description}>{description}</Box>
)}
</VStack>
);
} else if (status || variant) {
component = (
<Alert
maxWidth="100%"
alignSelf="center"
status={status ?? 'info'}
variant={variant as any}
accessibilityLiveRegion={accessibilityLiveRegion}
{...rest}
>
<VStack space={1} flexShrink={1} w="100%">
<HStack
flexShrink={1}
space={2}
alignItems="center"
justifyContent="space-between"
>
<HStack space={2} flexShrink={1} alignItems="center">
<Alert.Icon />
<Text
fontSize="md"
fontWeight="medium"
color={getTextColor(variant ?? 'subtle')}
>
{title}
</Text>
</HStack>
{isClosable ? (
<IconButton
variant="unstyled"
icon={
<CloseIcon
size="3"
color={getTextColor(variant ?? 'subtle')}
/>
}
onPress={() => hideToast(id)}
/>
) : null}
</HStack>
<Box
px="6"
// @ts-ignore
_text={{
color: getTextColor(variant ?? 'subtle'),
}}
>
{description}
</Box>
</s> add const setToast = React.useCallback(
(props: IToastProps): number => {
// console.log("in settoast");
const {
placement = 'bottom',
title,
render,
status,
id = toastIndex.current++,
description,
isClosable = true,
duration = 5000,
variant,
accessibilityAnnouncement,
accessibilityLiveRegion = 'polite',
...rest
} = props;
let positionToastArray = toastInfo[placement];
if (!positionToastArray) positionToastArray = [];
let component = null;
if (render) {
component = render({ id });
} else if (!status && !variant) {
component = (
<VStack
space={title && description ? 1 : 0}
{...themeProps}
{...rest}
>
<Box _text={themeProps._title}>{title}</Box>
{description && (
<Box _text={themeProps._description}>{description}</Box>
)}
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9840b99e371a10a7643a3a7b4b251dbcd83374de
|
src/components/composites/Toast/Toast.tsx
|
// iOS doesn't support accessibilityLiveRegion
if (accessibilityAnnouncement && Platform.OS === 'ios') {
AccessibilityInfo.announceForAccessibility(accessibilityAnnouncement);
}
|
<mask> hideToast(id);
<mask> }, duration);
<mask> }
<mask>
<mask> // iOS doesn't support accessibilityLiveRegion
<mask> if (accessibilityAnnouncement && Platform.OS === 'ios') {
<mask> AccessibilityInfo.announceForAccessibility(accessibilityAnnouncement);
<mask> }
<mask>
<mask> return id;
<mask> };
<mask>
<mask> return (
</s> feat: performance fixes in toast provider and fixes in hybrid provider </s> remove setVisibleToasts({ ...visibleToasts, [id]: true });
if (duration !== null) {
setTimeout(function () {
hideToast(id);
}, duration);
}
</s> add setVisibleToasts({ ...visibleToasts, [id]: true });
if (duration !== null) {
setTimeout(function () {
hideToast(id);
}, duration);
} </s> remove return id;
};
</s> add return id;
},
[getTextColor, themeProps, toastInfo, visibleToasts, hideToast]
);
const contextValue = React.useMemo(() => {
return {
toastInfo,
setToastInfo,
setToast,
removeToast,
hideAll,
isActive,
visibleToasts,
setVisibleToasts,
hideToast,
};
}, [
toastInfo,
setToastInfo,
setToast,
removeToast,
hideAll,
isActive,
visibleToasts,
setVisibleToasts,
hideToast,
]); </s> remove const setToast = (props: IToastProps): number => {
const {
placement = 'bottom',
title,
render,
status,
id = toastIndex.current++,
description,
isClosable = true,
duration = 5000,
variant,
accessibilityAnnouncement,
accessibilityLiveRegion = 'polite',
...rest
} = props;
let positionToastArray = toastInfo[placement];
if (!positionToastArray) positionToastArray = [];
let component = null;
if (render) {
component = render({ id });
} else if (!status && !variant) {
component = (
<VStack space={title && description ? 1 : 0} {...themeProps} {...rest}>
<Box _text={themeProps._title}>{title}</Box>
{description && (
<Box _text={themeProps._description}>{description}</Box>
)}
</VStack>
);
} else if (status || variant) {
component = (
<Alert
maxWidth="100%"
alignSelf="center"
status={status ?? 'info'}
variant={variant as any}
accessibilityLiveRegion={accessibilityLiveRegion}
{...rest}
>
<VStack space={1} flexShrink={1} w="100%">
<HStack
flexShrink={1}
space={2}
alignItems="center"
justifyContent="space-between"
>
<HStack space={2} flexShrink={1} alignItems="center">
<Alert.Icon />
<Text
fontSize="md"
fontWeight="medium"
color={getTextColor(variant ?? 'subtle')}
>
{title}
</Text>
</HStack>
{isClosable ? (
<IconButton
variant="unstyled"
icon={
<CloseIcon
size="3"
color={getTextColor(variant ?? 'subtle')}
/>
}
onPress={() => hideToast(id)}
/>
) : null}
</HStack>
<Box
px="6"
// @ts-ignore
_text={{
color: getTextColor(variant ?? 'subtle'),
}}
>
{description}
</Box>
</s> add const setToast = React.useCallback(
(props: IToastProps): number => {
// console.log("in settoast");
const {
placement = 'bottom',
title,
render,
status,
id = toastIndex.current++,
description,
isClosable = true,
duration = 5000,
variant,
accessibilityAnnouncement,
accessibilityLiveRegion = 'polite',
...rest
} = props;
let positionToastArray = toastInfo[placement];
if (!positionToastArray) positionToastArray = [];
let component = null;
if (render) {
component = render({ id });
} else if (!status && !variant) {
component = (
<VStack
space={title && description ? 1 : 0}
{...themeProps}
{...rest}
>
<Box _text={themeProps._title}>{title}</Box>
{description && (
<Box _text={themeProps._description}>{description}</Box>
)} </s> remove return false;
};
</s> add return false;
},
[toastInfo]
); </s> remove return prev;
});
};
</s> add return prev;
});
},
[setToastInfo]
);
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9840b99e371a10a7643a3a7b4b251dbcd83374de
|
src/components/composites/Toast/Toast.tsx
|
return id;
},
[getTextColor, themeProps, toastInfo, visibleToasts, hideToast]
);
const contextValue = React.useMemo(() => {
return {
toastInfo,
setToastInfo,
setToast,
removeToast,
hideAll,
isActive,
visibleToasts,
setVisibleToasts,
hideToast,
};
}, [
toastInfo,
setToastInfo,
setToast,
removeToast,
hideAll,
isActive,
visibleToasts,
setVisibleToasts,
hideToast,
]);
|
<mask> if (accessibilityAnnouncement && Platform.OS === 'ios') {
<mask> AccessibilityInfo.announceForAccessibility(accessibilityAnnouncement);
<mask> }
<mask>
<mask> return id;
<mask> };
<mask>
<mask> return (
<mask> <ToastContext.Provider
<mask> value={{
<mask> toastInfo,
</s> feat: performance fixes in toast provider and fixes in hybrid provider </s> remove // iOS doesn't support accessibilityLiveRegion
if (accessibilityAnnouncement && Platform.OS === 'ios') {
AccessibilityInfo.announceForAccessibility(accessibilityAnnouncement);
}
</s> add // iOS doesn't support accessibilityLiveRegion
if (accessibilityAnnouncement && Platform.OS === 'ios') {
AccessibilityInfo.announceForAccessibility(accessibilityAnnouncement);
} </s> remove <ToastContext.Provider
value={{
toastInfo,
setToastInfo,
setToast,
removeToast,
hideAll,
isActive,
visibleToasts,
setVisibleToasts,
hideToast,
}}
>
</s> add <ToastContext.Provider value={contextValue}> </s> remove setVisibleToasts({ ...visibleToasts, [id]: true });
if (duration !== null) {
setTimeout(function () {
hideToast(id);
}, duration);
}
</s> add setVisibleToasts({ ...visibleToasts, [id]: true });
if (duration !== null) {
setTimeout(function () {
hideToast(id);
}, duration);
} </s> remove const setToast = (props: IToastProps): number => {
const {
placement = 'bottom',
title,
render,
status,
id = toastIndex.current++,
description,
isClosable = true,
duration = 5000,
variant,
accessibilityAnnouncement,
accessibilityLiveRegion = 'polite',
...rest
} = props;
let positionToastArray = toastInfo[placement];
if (!positionToastArray) positionToastArray = [];
let component = null;
if (render) {
component = render({ id });
} else if (!status && !variant) {
component = (
<VStack space={title && description ? 1 : 0} {...themeProps} {...rest}>
<Box _text={themeProps._title}>{title}</Box>
{description && (
<Box _text={themeProps._description}>{description}</Box>
)}
</VStack>
);
} else if (status || variant) {
component = (
<Alert
maxWidth="100%"
alignSelf="center"
status={status ?? 'info'}
variant={variant as any}
accessibilityLiveRegion={accessibilityLiveRegion}
{...rest}
>
<VStack space={1} flexShrink={1} w="100%">
<HStack
flexShrink={1}
space={2}
alignItems="center"
justifyContent="space-between"
>
<HStack space={2} flexShrink={1} alignItems="center">
<Alert.Icon />
<Text
fontSize="md"
fontWeight="medium"
color={getTextColor(variant ?? 'subtle')}
>
{title}
</Text>
</HStack>
{isClosable ? (
<IconButton
variant="unstyled"
icon={
<CloseIcon
size="3"
color={getTextColor(variant ?? 'subtle')}
/>
}
onPress={() => hideToast(id)}
/>
) : null}
</HStack>
<Box
px="6"
// @ts-ignore
_text={{
color: getTextColor(variant ?? 'subtle'),
}}
>
{description}
</Box>
</s> add const setToast = React.useCallback(
(props: IToastProps): number => {
// console.log("in settoast");
const {
placement = 'bottom',
title,
render,
status,
id = toastIndex.current++,
description,
isClosable = true,
duration = 5000,
variant,
accessibilityAnnouncement,
accessibilityLiveRegion = 'polite',
...rest
} = props;
let positionToastArray = toastInfo[placement];
if (!positionToastArray) positionToastArray = [];
let component = null;
if (render) {
component = render({ id });
} else if (!status && !variant) {
component = (
<VStack
space={title && description ? 1 : 0}
{...themeProps}
{...rest}
>
<Box _text={themeProps._title}>{title}</Box>
{description && (
<Box _text={themeProps._description}>{description}</Box>
)} </s> remove const getTextColor = (
variant:
| 'solid'
| 'left-accent'
| 'top-accent'
| 'outline'
| 'subtle'
| 'outline-light'
| any
): any => {
switch (variant) {
case 'left-accent':
case 'top-accent':
case 'subtle':
return 'coolGray.800';
case 'solid':
return 'warmGray.50';
case 'outline':
case 'outline-light':
return colorMode === 'light' ? 'coolGray.800' : 'warmGray.50';
default:
return 'black';
}
};
</s> add const getTextColor = React.useCallback(
(
variant:
| 'solid'
| 'left-accent'
| 'top-accent'
| 'outline'
| 'subtle'
| 'outline-light'
| any
): any => {
switch (variant) {
case 'left-accent':
case 'top-accent':
case 'subtle':
return 'coolGray.800';
case 'solid':
return 'warmGray.50';
case 'outline':
case 'outline-light':
return colorMode === 'light' ? 'coolGray.800' : 'warmGray.50';
default:
return 'black';
}
},
[colorMode]
);
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9840b99e371a10a7643a3a7b4b251dbcd83374de
|
src/components/composites/Toast/Toast.tsx
|
<ToastContext.Provider value={contextValue}>
|
<mask> return id;
<mask> };
<mask>
<mask> return (
<mask> <ToastContext.Provider
<mask> value={{
<mask> toastInfo,
<mask> setToastInfo,
<mask> setToast,
<mask> removeToast,
<mask> hideAll,
<mask> isActive,
<mask> visibleToasts,
<mask> setVisibleToasts,
<mask> hideToast,
<mask> }}
<mask> >
<mask> {children}
<mask> <CustomToast />
<mask> </ToastContext.Provider>
<mask> );
<mask> };
</s> feat: performance fixes in toast provider and fixes in hybrid provider </s> remove return id;
};
</s> add return id;
},
[getTextColor, themeProps, toastInfo, visibleToasts, hideToast]
);
const contextValue = React.useMemo(() => {
return {
toastInfo,
setToastInfo,
setToast,
removeToast,
hideAll,
isActive,
visibleToasts,
setVisibleToasts,
hideToast,
};
}, [
toastInfo,
setToastInfo,
setToast,
removeToast,
hideAll,
isActive,
visibleToasts,
setVisibleToasts,
hideToast,
]); </s> remove </Alert>
);
}
</s> add );
} else if (status || variant) {
component = (
<Alert
maxWidth="100%"
alignSelf="center"
status={status ?? 'info'}
variant={variant as any}
accessibilityLiveRegion={accessibilityLiveRegion}
{...rest}
>
<VStack space={1} flexShrink={1} w="100%">
<HStack
flexShrink={1}
space={2}
alignItems="center"
justifyContent="space-between"
>
<HStack space={2} flexShrink={1} alignItems="center">
<Alert.Icon />
<Text
fontSize="md"
fontWeight="medium"
color={getTextColor(variant ?? 'subtle')}
>
{title}
</Text>
</HStack>
{isClosable ? (
<IconButton
variant="unstyled"
icon={
<CloseIcon
size="3"
color={getTextColor(variant ?? 'subtle')}
/>
}
onPress={() => hideToast(id)}
/>
) : null}
</HStack>
<Box
px="6"
// @ts-ignore
_text={{
color: getTextColor(variant ?? 'subtle'),
}}
>
{description}
</Box>
</VStack>
</Alert>
);
} </s> remove // iOS doesn't support accessibilityLiveRegion
if (accessibilityAnnouncement && Platform.OS === 'ios') {
AccessibilityInfo.announceForAccessibility(accessibilityAnnouncement);
}
</s> add // iOS doesn't support accessibilityLiveRegion
if (accessibilityAnnouncement && Platform.OS === 'ios') {
AccessibilityInfo.announceForAccessibility(accessibilityAnnouncement);
} </s> remove const setToast = (props: IToastProps): number => {
const {
placement = 'bottom',
title,
render,
status,
id = toastIndex.current++,
description,
isClosable = true,
duration = 5000,
variant,
accessibilityAnnouncement,
accessibilityLiveRegion = 'polite',
...rest
} = props;
let positionToastArray = toastInfo[placement];
if (!positionToastArray) positionToastArray = [];
let component = null;
if (render) {
component = render({ id });
} else if (!status && !variant) {
component = (
<VStack space={title && description ? 1 : 0} {...themeProps} {...rest}>
<Box _text={themeProps._title}>{title}</Box>
{description && (
<Box _text={themeProps._description}>{description}</Box>
)}
</VStack>
);
} else if (status || variant) {
component = (
<Alert
maxWidth="100%"
alignSelf="center"
status={status ?? 'info'}
variant={variant as any}
accessibilityLiveRegion={accessibilityLiveRegion}
{...rest}
>
<VStack space={1} flexShrink={1} w="100%">
<HStack
flexShrink={1}
space={2}
alignItems="center"
justifyContent="space-between"
>
<HStack space={2} flexShrink={1} alignItems="center">
<Alert.Icon />
<Text
fontSize="md"
fontWeight="medium"
color={getTextColor(variant ?? 'subtle')}
>
{title}
</Text>
</HStack>
{isClosable ? (
<IconButton
variant="unstyled"
icon={
<CloseIcon
size="3"
color={getTextColor(variant ?? 'subtle')}
/>
}
onPress={() => hideToast(id)}
/>
) : null}
</HStack>
<Box
px="6"
// @ts-ignore
_text={{
color: getTextColor(variant ?? 'subtle'),
}}
>
{description}
</Box>
</s> add const setToast = React.useCallback(
(props: IToastProps): number => {
// console.log("in settoast");
const {
placement = 'bottom',
title,
render,
status,
id = toastIndex.current++,
description,
isClosable = true,
duration = 5000,
variant,
accessibilityAnnouncement,
accessibilityLiveRegion = 'polite',
...rest
} = props;
let positionToastArray = toastInfo[placement];
if (!positionToastArray) positionToastArray = [];
let component = null;
if (render) {
component = render({ id });
} else if (!status && !variant) {
component = (
<VStack
space={title && description ? 1 : 0}
{...themeProps}
{...rest}
>
<Box _text={themeProps._title}>{title}</Box>
{description && (
<Box _text={themeProps._description}>{description}</Box>
)} </s> remove return prev;
});
};
</s> add return prev;
});
},
[setToastInfo]
);
|
[
"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/9840b99e371a10a7643a3a7b4b251dbcd83374de
|
src/components/composites/Toast/Toast.tsx
|
import React, { useMemo } from 'react';
|
<mask> import React, { useState } from 'react';
<mask> import { Platform } from 'react-native';
<mask> import { HybridContext } from './Context';
<mask> import { useModeManager } from './../color-mode/hooks';
<mask> import type { IColorModeProviderProps } from './../color-mode';
<mask> import { keyboardDismissHandlerManager } from '../../hooks';
</s> feat: performance fixes in toast provider and fixes in hybrid provider </s> remove { [key in string]: boolean }
</s> add {
[key in string]: boolean;
} </s> remove setVisibleToasts({ ...visibleToasts, [id]: true });
if (duration !== null) {
setTimeout(function () {
hideToast(id);
}, duration);
}
</s> add setVisibleToasts({ ...visibleToasts, [id]: true });
if (duration !== null) {
setTimeout(function () {
hideToast(id);
}, duration);
} </s> remove let toastIndex = React.useRef(1);
</s> add const toastIndex = React.useRef(1); </s> remove // iOS doesn't support accessibilityLiveRegion
if (accessibilityAnnouncement && Platform.OS === 'ios') {
AccessibilityInfo.announceForAccessibility(accessibilityAnnouncement);
}
</s> add // iOS doesn't support accessibilityLiveRegion
if (accessibilityAnnouncement && Platform.OS === 'ios') {
AccessibilityInfo.announceForAccessibility(accessibilityAnnouncement);
} </s> remove }
</s> add
|
[
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9840b99e371a10a7643a3a7b4b251dbcd83374de
|
src/core/hybrid-overlay/HybridProvider.tsx
|
const contextValue = useMemo(() => {
return {
colorMode: {
colorMode,
toggleColorMode,
setColorMode,
accessibleColors,
setAccessibleColors,
},
};
}, [
colorMode,
toggleColorMode,
setColorMode,
accessibleColors,
setAccessibleColors,
]);
|
<mask> const [accessibleColors, setAccessibleColors] = React.useState<boolean>(
<mask> isTextColorAccessible
<mask> );
<mask>
<mask> const [contextValue] = useState({
<mask> colorMode: {
<mask> colorMode,
<mask> toggleColorMode,
<mask> setColorMode,
<mask> accessibleColors,
<mask> setAccessibleColors,
<mask> },
<mask> });
<mask>
<mask> React.useEffect(() => {
<mask> let escapeKeyListener: any = null;
<mask>
<mask> if (Platform.OS === 'web') {
</s> feat: performance fixes in toast provider and fixes in hybrid provider </s> remove const removeToast = (id: any) => {
setToastInfo((prev) => {
for (let toastPosition of Object.keys(prev)) {
// @ts-ignore
let positionArray: Array<IToast> = prev[toastPosition];
const isToastPresent =
positionArray.findIndex((toastData) => toastData.id === id) > -1;
if (isToastPresent) {
let newPositionArray = positionArray.filter((item) => item.id !== id);
let temp: any = {};
temp[toastPosition] = newPositionArray;
let newToastInfo = { ...prev, ...temp };
return newToastInfo;
</s> add const removeToast = React.useCallback(
(id: any) => {
setToastInfo((prev) => {
for (const toastPosition of Object.keys(prev)) {
const positionArray: Array<IToast> = prev[toastPosition];
const isToastPresent =
positionArray.findIndex((toastData) => toastData.id === id) > -1;
if (isToastPresent) {
const newPositionArray = positionArray.filter(
(item) => item.id !== id
);
const temp: any = {};
temp[toastPosition] = newPositionArray;
const newToastInfo = { ...prev, ...temp };
return newToastInfo;
} </s> remove { [key in string]: boolean }
</s> add {
[key in string]: boolean;
} </s> remove };
const hideToast = (id: any) => {
setVisibleToasts((prevVisibleToasts) => ({
...prevVisibleToasts,
[id]: false,
}));
};
</s> add }, [setVisibleToasts]);
const hideToast = React.useCallback(
(id: any) => {
setVisibleToasts((prevVisibleToasts) => ({
...prevVisibleToasts,
[id]: false,
}));
},
[setVisibleToasts]
); </s> remove const getTextColor = (
variant:
| 'solid'
| 'left-accent'
| 'top-accent'
| 'outline'
| 'subtle'
| 'outline-light'
| any
): any => {
switch (variant) {
case 'left-accent':
case 'top-accent':
case 'subtle':
return 'coolGray.800';
case 'solid':
return 'warmGray.50';
case 'outline':
case 'outline-light':
return colorMode === 'light' ? 'coolGray.800' : 'warmGray.50';
default:
return 'black';
}
};
</s> add const getTextColor = React.useCallback(
(
variant:
| 'solid'
| 'left-accent'
| 'top-accent'
| 'outline'
| 'subtle'
| 'outline-light'
| any
): any => {
switch (variant) {
case 'left-accent':
case 'top-accent':
case 'subtle':
return 'coolGray.800';
case 'solid':
return 'warmGray.50';
case 'outline':
case 'outline-light':
return colorMode === 'light' ? 'coolGray.800' : 'warmGray.50';
default:
return 'black';
}
},
[colorMode]
); </s> remove const setToast = (props: IToastProps): number => {
const {
placement = 'bottom',
title,
render,
status,
id = toastIndex.current++,
description,
isClosable = true,
duration = 5000,
variant,
accessibilityAnnouncement,
accessibilityLiveRegion = 'polite',
...rest
} = props;
let positionToastArray = toastInfo[placement];
if (!positionToastArray) positionToastArray = [];
let component = null;
if (render) {
component = render({ id });
} else if (!status && !variant) {
component = (
<VStack space={title && description ? 1 : 0} {...themeProps} {...rest}>
<Box _text={themeProps._title}>{title}</Box>
{description && (
<Box _text={themeProps._description}>{description}</Box>
)}
</VStack>
);
} else if (status || variant) {
component = (
<Alert
maxWidth="100%"
alignSelf="center"
status={status ?? 'info'}
variant={variant as any}
accessibilityLiveRegion={accessibilityLiveRegion}
{...rest}
>
<VStack space={1} flexShrink={1} w="100%">
<HStack
flexShrink={1}
space={2}
alignItems="center"
justifyContent="space-between"
>
<HStack space={2} flexShrink={1} alignItems="center">
<Alert.Icon />
<Text
fontSize="md"
fontWeight="medium"
color={getTextColor(variant ?? 'subtle')}
>
{title}
</Text>
</HStack>
{isClosable ? (
<IconButton
variant="unstyled"
icon={
<CloseIcon
size="3"
color={getTextColor(variant ?? 'subtle')}
/>
}
onPress={() => hideToast(id)}
/>
) : null}
</HStack>
<Box
px="6"
// @ts-ignore
_text={{
color: getTextColor(variant ?? 'subtle'),
}}
>
{description}
</Box>
</s> add const setToast = React.useCallback(
(props: IToastProps): number => {
// console.log("in settoast");
const {
placement = 'bottom',
title,
render,
status,
id = toastIndex.current++,
description,
isClosable = true,
duration = 5000,
variant,
accessibilityAnnouncement,
accessibilityLiveRegion = 'polite',
...rest
} = props;
let positionToastArray = toastInfo[placement];
if (!positionToastArray) positionToastArray = [];
let component = null;
if (render) {
component = render({ id });
} else if (!status && !variant) {
component = (
<VStack
space={title && description ? 1 : 0}
{...themeProps}
{...rest}
>
<Box _text={themeProps._title}>{title}</Box>
{description && (
<Box _text={themeProps._description}>{description}</Box>
)}
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9840b99e371a10a7643a3a7b4b251dbcd83374de
|
src/core/hybrid-overlay/HybridProvider.tsx
|
<Pressable maxW="96">
|
<mask>
<mask> export function Example() {
<mask> return (
<mask> <Box alignItems="center">
<mask> <Pressable
<mask> maxW="96"
<mask> borderWidth="1"
<mask> borderColor="coolGray.300"
<mask> shadow="3"
<mask> rounded="8"
<mask> p="5"
<mask> >
<mask> {({ isHovered, isFocused, isPressed }) => {
<mask> return (
<mask> <Box
<mask> bg={
<mask> isPressed
</s> fix: pressable example and update snapshots </s> remove p="3"
</s> add p="5"
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98729a7fed23b0c3c919d140bda857eb0db84588
|
example/storybook/stories/components/primitives/Pressable/Events.tsx
|
p="5"
|
<mask> scale: isPressed ? 0.96 : 1,
<mask> },
<mask> ],
<mask> }}
<mask> p="3"
<mask> rounded="8"
<mask> >
<mask> <HStack alignItems="center">
<mask> <Badge
<mask> colorScheme="darkBlue"
</s> fix: pressable example and update snapshots </s> remove <Pressable
maxW="96"
borderWidth="1"
borderColor="coolGray.300"
shadow="3"
rounded="8"
p="5"
>
</s> add <Pressable maxW="96">
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98729a7fed23b0c3c919d140bda857eb0db84588
|
example/storybook/stories/components/primitives/Pressable/Events.tsx
|
shadow={3}
borderWidth="1"
borderColor="coolGray.300"
|
<mask> p="5"
<mask> rounded="8"
<mask> >
<mask> <HStack alignItems="center">
<mask> <Badge
<mask> colorScheme="darkBlue"
<mask> _text={{ color: 'white' }}
</s> fix: pressable example and update snapshots </s> remove p="3"
</s> add p="5" </s> remove <Pressable
maxW="96"
borderWidth="1"
borderColor="coolGray.300"
shadow="3"
rounded="8"
p="5"
>
</s> add <Pressable maxW="96">
|
[
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98729a7fed23b0c3c919d140bda857eb0db84588
|
example/storybook/stories/components/primitives/Pressable/Events.tsx
|
<mask> {},
<mask> { resolveResponsively: ['space', 'direction'] }
<mask> );
<mask>
<mask> // eslint-disable-next-line react-hooks/rules-of-hooks
<mask> const responsiveQueryContext = React.useContext(ResponsiveQueryContext);
<mask> const disableCSSMediaQueries = responsiveQueryContext.disableCSSMediaQueries;
<mask>
<mask> // eslint-disable-next-line react-hooks/rules-of-hooks
<mask> // const resolvedGap = useToken('space', space);
</s> fix: fixed stack for fragment by child flattening </s> remove // eslint-disable-next-line react-hooks/rules-of-hooks
// const resolvedGap = useToken('space', space);
</s> add </s> remove let childrenArray = React.Children.toArray(children);
</s> add let childrenArray = React.Children.toArray(flattenChildren(children));
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98cd225f3a6999f496ba9c6c56644cfb7c2a73c4
|
src/components/primitives/Stack/Stack.tsx
|
|
<mask> // eslint-disable-next-line react-hooks/rules-of-hooks
<mask> const responsiveQueryContext = React.useContext(ResponsiveQueryContext);
<mask> const disableCSSMediaQueries = responsiveQueryContext.disableCSSMediaQueries;
<mask>
<mask> // eslint-disable-next-line react-hooks/rules-of-hooks
<mask> // const resolvedGap = useToken('space', space);
<mask>
<mask> //TODO: refactor for responsive prop
<mask> if (useHasResponsiveProps(props)) {
<mask> return null;
<mask> }
<mask>
</s> fix: fixed stack for fragment by child flattening </s> remove // eslint-disable-next-line react-hooks/rules-of-hooks
</s> add </s> remove let childrenArray = React.Children.toArray(children);
</s> add let childrenArray = React.Children.toArray(flattenChildren(children));
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98cd225f3a6999f496ba9c6c56644cfb7c2a73c4
|
src/components/primitives/Stack/Stack.tsx
|
|
// Thanks @gregberge for code and @nandorojo for suggestion.
// Original source: https://github.com/gregberge/react-flatten-children
type ReactChildArray = ReturnType<typeof React.Children.toArray>;
function flattenChildren(children: React.ReactNode): ReactChildArray {
const childrenArray = React.Children.toArray(children);
return childrenArray.reduce((flatChildren: ReactChildArray, child) => {
if ((child as React.ReactElement<any>).type === React.Fragment) {
return flatChildren.concat(
flattenChildren((child as React.ReactElement<any>).props.children)
);
}
flatChildren.push(child);
return flatChildren;
}, []);
}
|
<mask> | ThemeSpaceType;
<mask>
<mask> const getSpacedChildren = (
<mask> children: JSX.Element[] | JSX.Element,
<mask> space: undefined | SpaceType,
<mask> axis: 'X' | 'Y',
<mask> reverse: string,
<mask> divider: JSX.Element | undefined
</s> fix: fixed stack for fragment by child flattening </s> remove // eslint-disable-next-line react-hooks/rules-of-hooks
</s> add </s> remove // eslint-disable-next-line react-hooks/rules-of-hooks
// const resolvedGap = useToken('space', space);
</s> add </s> remove let childrenArray = React.Children.toArray(children);
</s> add let childrenArray = React.Children.toArray(flattenChildren(children));
|
[
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98cd225f3a6999f496ba9c6c56644cfb7c2a73c4
|
src/utils/getSpacedChildren.tsx
|
let childrenArray = React.Children.toArray(flattenChildren(children));
|
<mask> axis: 'X' | 'Y',
<mask> reverse: string,
<mask> divider: JSX.Element | undefined
<mask> ): any => {
<mask> let childrenArray = React.Children.toArray(children);
<mask> childrenArray =
<mask> reverse === 'reverse' ? [...childrenArray].reverse() : childrenArray;
<mask>
<mask> const orientation = axis === 'X' ? 'vertical' : 'horizontal';
<mask>
</s> fix: fixed stack for fragment by child flattening </s> remove // eslint-disable-next-line react-hooks/rules-of-hooks
</s> add </s> remove // eslint-disable-next-line react-hooks/rules-of-hooks
// const resolvedGap = useToken('space', space);
</s> add
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98cd225f3a6999f496ba9c6c56644cfb7c2a73c4
|
src/utils/getSpacedChildren.tsx
|
'https://pbs.twimg.com/profile_images/1369921787568422915/hoyvrUpc_400x400.jpg',
|
<mask> <Avatar.Group size="lg" max={4}>
<mask> <Avatar
<mask> source={{
<mask> uri:
<mask> 'https://pbs.twimg.com/profile_images/1188747996843761665/8CiUdKZW_400x400.jpg',
<mask> }}
<mask> >
<mask> SS
<mask> </Avatar>
<mask> <Avatar
</s> fix: examples and border error message </s> remove ACTION 2
</s> add ACCEPT </s> remove <Button>ACTION 1</Button>
</s> add <Button>LEARN MORE</Button> </s> remove <Popover.Header>Confirmation!</Popover.Header>
<Popover.Body>
Are you sure you want to have that milkshake?
</Popover.Body>
<Popover.Footer>Footer</Popover.Footer>
</s> add <Popover.Header>Data Saved</Popover.Header>
<Popover.Body>Your changes has been saved.</Popover.Body>
<Popover.Footer>
<Link>View Changes</Link>
</Popover.Footer> </s> remove Hello World
</s> add Hey There! Tell us about yourself. </s> remove <Modal.Header>Hello World</Modal.Header>
</s> add <Modal.Header>Want to set focus somewhere?</Modal.Header>
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98db854d19b96e6973f645fe9d2b2a1de752a6bc
|
example/storybook/stories/components/composites/Avatar/AvatarGroup.tsx
|
return <Badge>NEW FEATURE</Badge>;
|
<mask> import React from 'react';
<mask> import { Badge } from 'native-base';
<mask>
<mask> export default function () {
<mask> return <Badge>DEFAULT BADGE</Badge>;
<mask> }
</s> fix: examples and border error message </s> remove import { Popover, Button } from 'native-base';
</s> add import { Popover, Button, Link } from 'native-base'; </s> remove import { SimpleGrid, Box } from 'native-base';
</s> add import { SimpleGrid, Center } from 'native-base'; </s> remove return <Box key={index} bg="primary.400" height={100} width={100} />;
</s> add return (
<Center
key={index}
bg="primary.200"
height={100}
width={100}
children={`${index}`}
/>
);
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98db854d19b96e6973f645fe9d2b2a1de752a6bc
|
example/storybook/stories/components/composites/Badge/usage.tsx
|
<Modal.Header>Cookie Policy</Modal.Header>
<Modal.Body>
We use our own and third-party cookies and other tracking
technologies, by continuing to browse the website, you accept our
use of cookies and tracking technologies.
</Modal.Body>
|
<mask> overlayVisible={true}
<mask> >
<mask> <Modal.Content>
<mask> <Modal.CloseButton />
<mask> <Modal.Header>Modal Header</Modal.Header>
<mask> <Modal.Body>Modal body text</Modal.Body>
<mask> <Modal.Footer>
<mask> <ButtonGroup variant="ghost" spacing={2}>
<mask> <Button>ACTION 1</Button>
<mask> <Button
<mask> onPress={() => {
</s> fix: examples and border error message </s> remove <Button>ACTION 1</Button>
</s> add <Button>LEARN MORE</Button> </s> remove Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
cupiditate expedita, ipsa corporis officia totam similique delectus!
Debitis esse, ea blanditiis iste enim iure at odit fugiat autem.
Accusamus?
<Input mt={4} ref={initialRef} placeholder="First name" />
</s> add The below input will get focus upon opening of the Modal
<Input
mt={4}
ref={initialRef}
placeholder="I'll recieve focus on Modal's opening"
/> </s> remove Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
cupiditate expedita, ipsa delectus!
<Input mt={4} placeholder="Lorem ipsum dolor sit" />
</s> add Just a one liner would work for us.
<Input mt={4} placeholder="Something about you..." /> </s> remove ACTION 2
</s> add ACCEPT </s> remove Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
cupiditate expedita, ipsa corporis officia totam similique delectus!
Debitis esse, ea blanditiis iste enim iure at odit fugiat autem.
Accusamus?
<Input mt={4} placeholder="Lorem ipsum dolor sit" />
</s> add Try typing something in the Input.
<Input mt={4} placeholder="Click here..." />
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98db854d19b96e6973f645fe9d2b2a1de752a6bc
|
example/storybook/stories/components/composites/Modal/Basic.tsx
|
<Button>LEARN MORE</Button>
|
<mask> <Modal.Header>Modal Header</Modal.Header>
<mask> <Modal.Body>Modal body text</Modal.Body>
<mask> <Modal.Footer>
<mask> <ButtonGroup variant="ghost" spacing={2}>
<mask> <Button>ACTION 1</Button>
<mask> <Button
<mask> onPress={() => {
<mask> setModalVisible(!modalVisible);
<mask> }}
<mask> >
</s> fix: examples and border error message </s> remove <Modal.Header>Modal Header</Modal.Header>
<Modal.Body>Modal body text</Modal.Body>
</s> add <Modal.Header>Cookie Policy</Modal.Header>
<Modal.Body>
We use our own and third-party cookies and other tracking
technologies, by continuing to browse the website, you accept our
use of cookies and tracking technologies.
</Modal.Body> </s> remove ACTION 2
</s> add ACCEPT </s> remove Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
cupiditate expedita, ipsa delectus!
<Input mt={4} placeholder="Lorem ipsum dolor sit" />
</s> add Just a one liner would work for us.
<Input mt={4} placeholder="Something about you..." /> </s> remove Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
cupiditate expedita, ipsa corporis officia totam similique delectus!
Debitis esse, ea blanditiis iste enim iure at odit fugiat autem.
Accusamus?
<Input mt={4} placeholder="Lorem ipsum dolor sit" />
</s> add Try typing something in the Input.
<Input mt={4} placeholder="Click here..." /> </s> remove Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
cupiditate expedita, ipsa corporis officia totam similique delectus!
Debitis esse, ea blanditiis iste enim iure at odit fugiat autem.
Accusamus?
<Input mt={4} ref={initialRef} placeholder="First name" />
</s> add The below input will get focus upon opening of the Modal
<Input
mt={4}
ref={initialRef}
placeholder="I'll recieve focus on Modal's opening"
/>
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98db854d19b96e6973f645fe9d2b2a1de752a6bc
|
example/storybook/stories/components/composites/Modal/Basic.tsx
|
ACCEPT
|
<mask> onPress={() => {
<mask> setModalVisible(!modalVisible);
<mask> }}
<mask> >
<mask> ACTION 2
<mask> </Button>
<mask> </ButtonGroup>
<mask> </Modal.Footer>
<mask> </Modal.Content>
<mask> </Modal>
</s> fix: examples and border error message </s> remove <Button>ACTION 1</Button>
</s> add <Button>LEARN MORE</Button> </s> remove <Modal.Header>Modal Header</Modal.Header>
<Modal.Body>Modal body text</Modal.Body>
</s> add <Modal.Header>Cookie Policy</Modal.Header>
<Modal.Body>
We use our own and third-party cookies and other tracking
technologies, by continuing to browse the website, you accept our
use of cookies and tracking technologies.
</Modal.Body> </s> remove 'https://pbs.twimg.com/profile_images/1188747996843761665/8CiUdKZW_400x400.jpg',
</s> add 'https://pbs.twimg.com/profile_images/1369921787568422915/hoyvrUpc_400x400.jpg', </s> remove (props: IIconButtonProps & { ref?: any }) => JSX.Element
</s> add (props: Omit<IIconButtonProps, 'icon'> & { ref?: any }) => JSX.Element </s> remove <Popover.Header>Confirmation!</Popover.Header>
<Popover.Body>
Are you sure you want to have that milkshake?
</Popover.Body>
<Popover.Footer>Footer</Popover.Footer>
</s> add <Popover.Header>Data Saved</Popover.Header>
<Popover.Body>Your changes has been saved.</Popover.Body>
<Popover.Footer>
<Link>View Changes</Link>
</Popover.Footer>
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98db854d19b96e6973f645fe9d2b2a1de752a6bc
|
example/storybook/stories/components/composites/Modal/Basic.tsx
|
<Modal.Header>Want to set focus somewhere?</Modal.Header>
|
<mask> finalFocusRef={finalRef}
<mask> >
<mask> <Modal.Content>
<mask> <Modal.CloseButton />
<mask> <Modal.Header>Hello World</Modal.Header>
<mask> <Modal.Body>
<mask> Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
<mask> cupiditate expedita, ipsa corporis officia totam similique delectus!
<mask> Debitis esse, ea blanditiis iste enim iure at odit fugiat autem.
<mask> Accusamus?
</s> fix: examples and border error message </s> remove Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
cupiditate expedita, ipsa corporis officia totam similique delectus!
Debitis esse, ea blanditiis iste enim iure at odit fugiat autem.
Accusamus?
<Input mt={4} ref={initialRef} placeholder="First name" />
</s> add The below input will get focus upon opening of the Modal
<Input
mt={4}
ref={initialRef}
placeholder="I'll recieve focus on Modal's opening"
/> </s> remove <Modal.Header _text={{ fontSize: '4xl', fontWeight: 'bold' }}>
Hello World
</s> add <Modal.Header _text={{ fontSize: '2xl', fontWeight: 'bold' }}>
Your Keyboard can't hide me. </s> remove Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
cupiditate expedita, ipsa corporis officia totam similique delectus!
Debitis esse, ea blanditiis iste enim iure at odit fugiat autem.
Accusamus?
<Input mt={4} placeholder="Lorem ipsum dolor sit" />
</s> add Try typing something in the Input.
<Input mt={4} placeholder="Click here..." /> </s> remove Hello World
</s> add Hey There! Tell us about yourself. </s> remove Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
cupiditate expedita, ipsa delectus!
<Input mt={4} placeholder="Lorem ipsum dolor sit" />
</s> add Just a one liner would work for us.
<Input mt={4} placeholder="Something about you..." />
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98db854d19b96e6973f645fe9d2b2a1de752a6bc
|
example/storybook/stories/components/composites/Modal/ModalRefEg.tsx
|
The below input will get focus upon opening of the Modal
<Input
mt={4}
ref={initialRef}
placeholder="I'll recieve focus on Modal's opening"
/>
|
<mask> <Modal.Content>
<mask> <Modal.CloseButton />
<mask> <Modal.Header>Hello World</Modal.Header>
<mask> <Modal.Body>
<mask> Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
<mask> cupiditate expedita, ipsa corporis officia totam similique delectus!
<mask> Debitis esse, ea blanditiis iste enim iure at odit fugiat autem.
<mask> Accusamus?
<mask> <Input mt={4} ref={initialRef} placeholder="First name" />
<mask> </Modal.Body>
<mask> <Modal.Footer>
<mask> <ButtonGroup variant="ghost" spacing={2}>
<mask> <Button>SAVE</Button>
<mask> <Button
</s> fix: examples and border error message </s> remove <Modal.Header>Hello World</Modal.Header>
</s> add <Modal.Header>Want to set focus somewhere?</Modal.Header> </s> remove Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
cupiditate expedita, ipsa corporis officia totam similique delectus!
Debitis esse, ea blanditiis iste enim iure at odit fugiat autem.
Accusamus?
<Input mt={4} placeholder="Lorem ipsum dolor sit" />
</s> add Try typing something in the Input.
<Input mt={4} placeholder="Click here..." /> </s> remove <Modal.Header _text={{ fontSize: '4xl', fontWeight: 'bold' }}>
Hello World
</s> add <Modal.Header _text={{ fontSize: '2xl', fontWeight: 'bold' }}>
Your Keyboard can't hide me. </s> remove Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
cupiditate expedita, ipsa delectus!
<Input mt={4} placeholder="Lorem ipsum dolor sit" />
</s> add Just a one liner would work for us.
<Input mt={4} placeholder="Something about you..." /> </s> remove Hello World
</s> add Hey There! Tell us about yourself.
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98db854d19b96e6973f645fe9d2b2a1de752a6bc
|
example/storybook/stories/components/composites/Modal/ModalRefEg.tsx
|
<Modal.Header _text={{ fontSize: '2xl', fontWeight: 'bold' }}>
Your Keyboard can't hide me.
|
<mask> avoidKeyboard
<mask> >
<mask> <Modal.Content>
<mask> <Modal.CloseButton />
<mask> <Modal.Header _text={{ fontSize: '4xl', fontWeight: 'bold' }}>
<mask> Hello World
<mask> </Modal.Header>
<mask> <Modal.Body>
<mask> Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
<mask> cupiditate expedita, ipsa corporis officia totam similique delectus!
<mask> Debitis esse, ea blanditiis iste enim iure at odit fugiat autem.
</s> fix: examples and border error message </s> remove Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
cupiditate expedita, ipsa corporis officia totam similique delectus!
Debitis esse, ea blanditiis iste enim iure at odit fugiat autem.
Accusamus?
<Input mt={4} placeholder="Lorem ipsum dolor sit" />
</s> add Try typing something in the Input.
<Input mt={4} placeholder="Click here..." /> </s> remove <Modal.Header>Hello World</Modal.Header>
</s> add <Modal.Header>Want to set focus somewhere?</Modal.Header> </s> remove Hello World
</s> add Hey There! Tell us about yourself. </s> remove Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
cupiditate expedita, ipsa corporis officia totam similique delectus!
Debitis esse, ea blanditiis iste enim iure at odit fugiat autem.
Accusamus?
<Input mt={4} ref={initialRef} placeholder="First name" />
</s> add The below input will get focus upon opening of the Modal
<Input
mt={4}
ref={initialRef}
placeholder="I'll recieve focus on Modal's opening"
/> </s> remove Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
cupiditate expedita, ipsa delectus!
<Input mt={4} placeholder="Lorem ipsum dolor sit" />
</s> add Just a one liner would work for us.
<Input mt={4} placeholder="Something about you..." />
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98db854d19b96e6973f645fe9d2b2a1de752a6bc
|
example/storybook/stories/components/composites/Modal/ModalWithAvoidKeyboard.tsx
|
Try typing something in the Input.
<Input mt={4} placeholder="Click here..." />
|
<mask> <Modal.Header _text={{ fontSize: '4xl', fontWeight: 'bold' }}>
<mask> Hello World
<mask> </Modal.Header>
<mask> <Modal.Body>
<mask> Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
<mask> cupiditate expedita, ipsa corporis officia totam similique delectus!
<mask> Debitis esse, ea blanditiis iste enim iure at odit fugiat autem.
<mask> Accusamus?
<mask> <Input mt={4} placeholder="Lorem ipsum dolor sit" />
<mask> </Modal.Body>
<mask> <Modal.Footer>
<mask> <ButtonGroup variant="ghost" spacing={2}>
<mask> <Button>SAVE</Button>
<mask> <Button
</s> fix: examples and border error message </s> remove <Modal.Header _text={{ fontSize: '4xl', fontWeight: 'bold' }}>
Hello World
</s> add <Modal.Header _text={{ fontSize: '2xl', fontWeight: 'bold' }}>
Your Keyboard can't hide me. </s> remove Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
cupiditate expedita, ipsa delectus!
<Input mt={4} placeholder="Lorem ipsum dolor sit" />
</s> add Just a one liner would work for us.
<Input mt={4} placeholder="Something about you..." /> </s> remove Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
cupiditate expedita, ipsa corporis officia totam similique delectus!
Debitis esse, ea blanditiis iste enim iure at odit fugiat autem.
Accusamus?
<Input mt={4} ref={initialRef} placeholder="First name" />
</s> add The below input will get focus upon opening of the Modal
<Input
mt={4}
ref={initialRef}
placeholder="I'll recieve focus on Modal's opening"
/> </s> remove <Modal.Header>Hello World</Modal.Header>
</s> add <Modal.Header>Want to set focus somewhere?</Modal.Header> </s> remove Hello World
</s> add Hey There! Tell us about yourself.
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98db854d19b96e6973f645fe9d2b2a1de752a6bc
|
example/storybook/stories/components/composites/Modal/ModalWithAvoidKeyboard.tsx
|
Hey There! Tell us about yourself.
|
<mask> >
<mask> <Modal.Content>
<mask> <Modal.CloseButton />
<mask> <Modal.Header _text={{ fontSize: '2xl', fontWeight: 'bold' }}>
<mask> Hello World
<mask> </Modal.Header>
<mask> <Modal.Body>
<mask> Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
<mask> cupiditate expedita, ipsa delectus!
<mask> <Input mt={4} placeholder="Lorem ipsum dolor sit" />
</s> fix: examples and border error message </s> remove Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
cupiditate expedita, ipsa delectus!
<Input mt={4} placeholder="Lorem ipsum dolor sit" />
</s> add Just a one liner would work for us.
<Input mt={4} placeholder="Something about you..." /> </s> remove <Modal.Header _text={{ fontSize: '4xl', fontWeight: 'bold' }}>
Hello World
</s> add <Modal.Header _text={{ fontSize: '2xl', fontWeight: 'bold' }}>
Your Keyboard can't hide me. </s> remove Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
cupiditate expedita, ipsa corporis officia totam similique delectus!
Debitis esse, ea blanditiis iste enim iure at odit fugiat autem.
Accusamus?
<Input mt={4} placeholder="Lorem ipsum dolor sit" />
</s> add Try typing something in the Input.
<Input mt={4} placeholder="Click here..." /> </s> remove <Modal.Header>Hello World</Modal.Header>
</s> add <Modal.Header>Want to set focus somewhere?</Modal.Header> </s> remove Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
cupiditate expedita, ipsa corporis officia totam similique delectus!
Debitis esse, ea blanditiis iste enim iure at odit fugiat autem.
Accusamus?
<Input mt={4} ref={initialRef} placeholder="First name" />
</s> add The below input will get focus upon opening of the Modal
<Input
mt={4}
ref={initialRef}
placeholder="I'll recieve focus on Modal's opening"
/>
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98db854d19b96e6973f645fe9d2b2a1de752a6bc
|
example/storybook/stories/components/composites/Modal/Size.tsx
|
Just a one liner would work for us.
<Input mt={4} placeholder="Something about you..." />
|
<mask> <Modal.Header _text={{ fontSize: '2xl', fontWeight: 'bold' }}>
<mask> Hello World
<mask> </Modal.Header>
<mask> <Modal.Body>
<mask> Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
<mask> cupiditate expedita, ipsa delectus!
<mask> <Input mt={4} placeholder="Lorem ipsum dolor sit" />
<mask> </Modal.Body>
<mask> <Modal.Footer>
<mask> <ButtonGroup variant="ghost" spacing={2}>
<mask> <Button>SAVE</Button>
<mask> <Button
</s> fix: examples and border error message </s> remove Hello World
</s> add Hey There! Tell us about yourself. </s> remove Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
cupiditate expedita, ipsa corporis officia totam similique delectus!
Debitis esse, ea blanditiis iste enim iure at odit fugiat autem.
Accusamus?
<Input mt={4} placeholder="Lorem ipsum dolor sit" />
</s> add Try typing something in the Input.
<Input mt={4} placeholder="Click here..." /> </s> remove <Modal.Header _text={{ fontSize: '4xl', fontWeight: 'bold' }}>
Hello World
</s> add <Modal.Header _text={{ fontSize: '2xl', fontWeight: 'bold' }}>
Your Keyboard can't hide me. </s> remove Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
cupiditate expedita, ipsa corporis officia totam similique delectus!
Debitis esse, ea blanditiis iste enim iure at odit fugiat autem.
Accusamus?
<Input mt={4} ref={initialRef} placeholder="First name" />
</s> add The below input will get focus upon opening of the Modal
<Input
mt={4}
ref={initialRef}
placeholder="I'll recieve focus on Modal's opening"
/> </s> remove <Modal.Header>Hello World</Modal.Header>
</s> add <Modal.Header>Want to set focus somewhere?</Modal.Header>
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98db854d19b96e6973f645fe9d2b2a1de752a6bc
|
example/storybook/stories/components/composites/Modal/Size.tsx
|
import { Popover, Button, Link } from 'native-base';
|
<mask> import React from 'react';
<mask> import { Popover, Button } from 'native-base';
<mask>
<mask> export default function () {
<mask> return (
<mask> <Popover
<mask> trigger={(triggerProps: any) => {
</s> fix: examples and border error message </s> remove return <Badge>DEFAULT BADGE</Badge>;
</s> add return <Badge>NEW FEATURE</Badge>; </s> remove import { SimpleGrid, Box } from 'native-base';
</s> add import { SimpleGrid, Center } from 'native-base'; </s> remove return <Box key={index} bg="primary.400" height={100} width={100} />;
</s> add return (
<Center
key={index}
bg="primary.200"
height={100}
width={100}
children={`${index}`}
/>
); </s> remove (props: IIconButtonProps & { ref?: any }) => JSX.Element
</s> add (props: Omit<IIconButtonProps, 'icon'> & { ref?: any }) => JSX.Element
|
[
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98db854d19b96e6973f645fe9d2b2a1de752a6bc
|
example/storybook/stories/components/composites/Popover/Basic.tsx
|
<Popover.Header>Data Saved</Popover.Header>
<Popover.Body>Your changes has been saved.</Popover.Body>
<Popover.Footer>
<Link>View Changes</Link>
</Popover.Footer>
|
<mask> }}
<mask> >
<mask> <Popover.Content>
<mask> <Popover.CloseButton />
<mask> <Popover.Header>Confirmation!</Popover.Header>
<mask> <Popover.Body>
<mask> Are you sure you want to have that milkshake?
<mask> </Popover.Body>
<mask> <Popover.Footer>Footer</Popover.Footer>
<mask> </Popover.Content>
<mask> </Popover>
<mask> );
<mask> }
</s> fix: examples and border error message </s> remove <Modal.Header>Modal Header</Modal.Header>
<Modal.Body>Modal body text</Modal.Body>
</s> add <Modal.Header>Cookie Policy</Modal.Header>
<Modal.Body>
We use our own and third-party cookies and other tracking
technologies, by continuing to browse the website, you accept our
use of cookies and tracking technologies.
</Modal.Body> </s> remove return <Box key={index} bg="primary.400" height={100} width={100} />;
</s> add return (
<Center
key={index}
bg="primary.200"
height={100}
width={100}
children={`${index}`}
/>
); </s> remove 'https://pbs.twimg.com/profile_images/1188747996843761665/8CiUdKZW_400x400.jpg',
</s> add 'https://pbs.twimg.com/profile_images/1369921787568422915/hoyvrUpc_400x400.jpg', </s> remove ACTION 2
</s> add ACCEPT </s> remove <Button>ACTION 1</Button>
</s> add <Button>LEARN MORE</Button>
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98db854d19b96e6973f645fe9d2b2a1de752a6bc
|
example/storybook/stories/components/composites/Popover/Basic.tsx
|
import { SimpleGrid, Center } from 'native-base';
|
<mask> import { SimpleGrid, Box } from 'native-base';
<mask> import React from 'react';
<mask>
<mask> const items = 12;
<mask> const data = Array(items).fill(0);
<mask>
</s> fix: examples and border error message </s> remove import { Popover, Button } from 'native-base';
</s> add import { Popover, Button, Link } from 'native-base'; </s> remove return <Badge>DEFAULT BADGE</Badge>;
</s> add return <Badge>NEW FEATURE</Badge>; </s> remove return <Box key={index} bg="primary.400" height={100} width={100} />;
</s> add return (
<Center
key={index}
bg="primary.200"
height={100}
width={100}
children={`${index}`}
/>
); </s> remove <Popover.Header>Confirmation!</Popover.Header>
<Popover.Body>
Are you sure you want to have that milkshake?
</Popover.Body>
<Popover.Footer>Footer</Popover.Footer>
</s> add <Popover.Header>Data Saved</Popover.Header>
<Popover.Body>Your changes has been saved.</Popover.Body>
<Popover.Footer>
<Link>View Changes</Link>
</Popover.Footer>
|
[
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98db854d19b96e6973f645fe9d2b2a1de752a6bc
|
example/storybook/stories/components/composites/SimpleGrid/NumberOfColumns.tsx
|
return (
<Center
key={index}
bg="primary.200"
height={100}
width={100}
children={`${index}`}
/>
);
|
<mask> export default function NumberOfColumnsSimpleGrid() {
<mask> return (
<mask> <SimpleGrid columns={3} space={4}>
<mask> {data.map((_item, index) => {
<mask> return <Box key={index} bg="primary.400" height={100} width={100} />;
<mask> })}
<mask> </SimpleGrid>
<mask> );
<mask> }
</s> fix: examples and border error message </s> remove import { Popover, Button } from 'native-base';
</s> add import { Popover, Button, Link } from 'native-base'; </s> remove return <Badge>DEFAULT BADGE</Badge>;
</s> add return <Badge>NEW FEATURE</Badge>;
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98db854d19b96e6973f645fe9d2b2a1de752a6bc
|
example/storybook/stories/components/composites/SimpleGrid/NumberOfColumns.tsx
|
(props: Omit<IIconButtonProps, 'icon'> & { ref?: any }) => JSX.Element
|
<mask> Body: React.MemoExoticComponent<
<mask> (props: IBoxProps & { ref?: any }) => JSX.Element
<mask> >;
<mask> CloseButton: React.MemoExoticComponent<
<mask> (props: IIconButtonProps & { ref?: any }) => JSX.Element
<mask> >;
<mask> Content: React.MemoExoticComponent<
<mask> (props: IPopoverContentProps & { ref?: any }) => JSX.Element
<mask> >;
<mask> Footer: React.MemoExoticComponent<
</s> fix: examples and border error message </s> remove customFlexboxProps &
BorderProps & {
</s> add customFlexboxProps & { </s> remove ACTION 2
</s> add ACCEPT </s> remove import { Popover, Button } from 'native-base';
</s> add import { Popover, Button, Link } from 'native-base'; </s> remove <Button>ACTION 1</Button>
</s> add <Button>LEARN MORE</Button>
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98db854d19b96e6973f645fe9d2b2a1de752a6bc
|
src/components/composites/Popover/types.ts
|
BorderProps &
|
<mask> LayoutProps &
<mask> FlexboxProps &
<mask> TypographyProps &
<mask> PositionProps &
<mask> customBorderProps &
<mask> customPositionProps &
<mask> customExtraProps &
<mask> customOutlineProps &
<mask> customShadowProps &
<mask> customLayoutProps &
</s> fix: examples and border error message </s> remove customFlexboxProps &
BorderProps & {
</s> add customFlexboxProps & { </s> remove (props: IIconButtonProps & { ref?: any }) => JSX.Element
</s> add (props: Omit<IIconButtonProps, 'icon'> & { ref?: any }) => JSX.Element </s> remove Hello World
</s> add Hey There! Tell us about yourself. </s> remove return <Badge>DEFAULT BADGE</Badge>;
</s> add return <Badge>NEW FEATURE</Badge>;
|
[
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98db854d19b96e6973f645fe9d2b2a1de752a6bc
|
src/components/primitives/Box/types.ts
|
customFlexboxProps & {
|
<mask> customLayoutProps &
<mask> customTypographyProps &
<mask> customBackgroundProps &
<mask> customTransformProps &
<mask> customFlexboxProps &
<mask> BorderProps & {
<mask> style?: ViewStyle;
<mask> children?: JSX.Element | JSX.Element[] | string | any;
<mask> shadow?: number;
<mask> _text?: ITextProps;
<mask> };
</s> fix: examples and border error message </s> remove (props: IIconButtonProps & { ref?: any }) => JSX.Element
</s> add (props: Omit<IIconButtonProps, 'icon'> & { ref?: any }) => JSX.Element </s> remove import { Popover, Button } from 'native-base';
</s> add import { Popover, Button, Link } from 'native-base';
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98db854d19b96e6973f645fe9d2b2a1de752a6bc
|
src/components/primitives/Box/types.ts
|
if (property === 'border') {
if (typeof props.border === 'string' && !props.border.includes(' ')) {
throw Error(
'`border` expects value in the form of `1px solid`,`1px dotted` or a number.'
);
}
}
|
<mask> for (let property in props) {
<mask> // If the property exists in themePropertyMap then get its value
<mask> if (themePropertyMap[property]) {
<mask> let propValues = extractPropertyFromFunction(
<mask> property,
<mask> props,
<mask> theme,
<mask> componentTheme
</s> fix: examples and border error message </s> remove import { SimpleGrid, Box } from 'native-base';
</s> add import { SimpleGrid, Center } from 'native-base'; </s> remove borderColor: mode('gray.100', 'gray.700')(props),
</s> add borderColor: mode('gray.300', 'gray.700')(props), </s> remove Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
cupiditate expedita, ipsa corporis officia totam similique delectus!
Debitis esse, ea blanditiis iste enim iure at odit fugiat autem.
Accusamus?
<Input mt={4} placeholder="Lorem ipsum dolor sit" />
</s> add Try typing something in the Input.
<Input mt={4} placeholder="Click here..." /> </s> remove Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos quasi
cupiditate expedita, ipsa corporis officia totam similique delectus!
Debitis esse, ea blanditiis iste enim iure at odit fugiat autem.
Accusamus?
<Input mt={4} ref={initialRef} placeholder="First name" />
</s> add The below input will get focus upon opening of the Modal
<Input
mt={4}
ref={initialRef}
placeholder="I'll recieve focus on Modal's opening"
/>
|
[
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98db854d19b96e6973f645fe9d2b2a1de752a6bc
|
src/hooks/useThemeProps/utils.ts
|
bg: mode('white', 'gray.800')(props),
|
<mask> props,
<mask> colorScheme !== 'primary' ? colorScheme : status
<mask> );
<mask> return {
<mask> borderWidth: 1,
<mask> borderColor: mode(`${colorScheme}.600`, `${colorScheme}.500`)(props),
<mask> iconColor: mode(`${colorScheme}.500`, `${colorScheme}.500`)(props),
<mask> textColor: getColor(theme, `${colorScheme}.700`, colorScheme),
<mask> };
</s> fix: examples and border error message </s> remove borderColor: mode('gray.100', 'gray.700')(props),
</s> add borderColor: mode('gray.300', 'gray.700')(props), </s> remove return <Box key={index} bg="primary.400" height={100} width={100} />;
</s> add return (
<Center
key={index}
bg="primary.200"
height={100}
width={100}
children={`${index}`}
/>
);
|
[
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98db854d19b96e6973f645fe9d2b2a1de752a6bc
|
src/theme/components/alert.ts
|
bg: mode('white', 'gray.800')(props),
|
<mask> );
<mask> return {
<mask> borderWidth: 1,
<mask> borderColor: transparentize(`${colorScheme}.600`, 0.2)(theme),
<mask> iconColor: mode(`${colorScheme}.500`, `${colorScheme}.200`)(props),
<mask> textColor: getColor(theme, `${colorScheme}.900`, colorScheme),
</s> fix: examples and border error message </s> remove borderColor: mode('gray.100', 'gray.700')(props),
</s> add borderColor: mode('gray.300', 'gray.700')(props), </s> remove return <Box key={index} bg="primary.400" height={100} width={100} />;
</s> add return (
<Center
key={index}
bg="primary.200"
height={100}
width={100}
children={`${index}`}
/>
);
|
[
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98db854d19b96e6973f645fe9d2b2a1de752a6bc
|
src/theme/components/alert.ts
|
borderColor: mode('gray.300', 'gray.700')(props),
|
<mask> mb: 3,
<mask> pt: 3,
<mask> px: 3,
<mask> borderTopWidth: 1,
<mask> },
<mask> popoverContentProps: {
<mask> backgroundColor: mode('gray.100', 'gray.600')(props),
</s> fix: examples and border error message </s> remove borderColor: mode('gray.100', 'gray.700')(props),
</s> add borderColor: mode('gray.300', 'gray.700')(props), </s> remove import { Popover, Button } from 'native-base';
</s> add import { Popover, Button, Link } from 'native-base';
|
[
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98db854d19b96e6973f645fe9d2b2a1de752a6bc
|
src/theme/components/popover.ts
|
borderColor: mode('gray.300', 'gray.700')(props),
|
<mask> },
<mask> popoverContentProps: {
<mask> backgroundColor: mode('gray.100', 'gray.600')(props),
<mask> // borderColor: 'gray.300',
<mask> borderColor: mode('gray.100', 'gray.700')(props),
<mask> borderWidth: 1,
<mask> },
<mask> popoverHeaderProps: {
<mask> pt: 2,
<mask> pb: 3,
</s> fix: examples and border error message
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98db854d19b96e6973f645fe9d2b2a1de752a6bc
|
src/theme/components/popover.ts
|
borderColor: mode('gray.300', 'gray.700')(props),
|
<mask> pb: 3,
<mask> pt: 3,
<mask> borderTopWidth: 1,
<mask> flexDirection: 'row',
<mask> flexWrap: 'wrap',
<mask> },
<mask> };
</s> fix: examples and border error message </s> remove borderColor: mode('gray.100', 'gray.700')(props),
</s> add borderColor: mode('gray.300', 'gray.700')(props), </s> remove customFlexboxProps &
BorderProps & {
</s> add customFlexboxProps & {
|
[
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/98db854d19b96e6973f645fe9d2b2a1de752a6bc
|
src/theme/components/popover.ts
|
import React, { Text, TouchableOpacity } from 'react-native';
|
<mask> /* @flow */
<mask> 'use strict';
<mask>
<mask> import React, { Text, View, TouchableOpacity } from 'react-native';
<mask> import NativeBaseComponent from '../Base/NativeBaseComponent';
<mask> import button from '../Styles/button';
<mask> import _ from 'lodash';
<mask> import computeProps from '../../Utils/computeProps';
<mask> import Icon from 'react-native-vector-icons/Ionicons';
</s> default icon style, icon-left and icon-roght prop </s> remove import button from '../Styles/button';
import _ from 'lodash';
</s> add </s> remove import Icon from 'react-native-vector-icons/Ionicons';
</s> add import Icon from './Icon';
import _ from 'lodash'; </s> remove static childContextTypes = {
theme: React.PropTypes.object
}
getChildContext() {
return {theme: this.props.theme ? this.props.theme : this.getTheme()};
}
</s> add </s> remove return(this.renderChildren());
</s> add return(
<TouchableOpacity {...this.prepareRootProps()} >
{this.renderChildren()}
</TouchableOpacity>
);
|
[
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9945be3b10107aac7762e55fa966d70c3f83eb93
|
Components/Widgets/Button.js
|
<mask> 'use strict';
<mask>
<mask> import React, { Text, View, TouchableOpacity } from 'react-native';
<mask> import NativeBaseComponent from '../Base/NativeBaseComponent';
<mask> import button from '../Styles/button';
<mask> import _ from 'lodash';
<mask> import computeProps from '../../Utils/computeProps';
<mask> import Icon from 'react-native-vector-icons/Ionicons';
<mask>
<mask>
<mask> export default class Button extends NativeBaseComponent {
</s> default icon style, icon-left and icon-roght prop </s> remove import React, { Text, View, TouchableOpacity } from 'react-native';
</s> add import React, { Text, TouchableOpacity } from 'react-native'; </s> remove import Icon from 'react-native-vector-icons/Ionicons';
</s> add import Icon from './Icon';
import _ from 'lodash'; </s> remove static childContextTypes = {
theme: React.PropTypes.object
}
getChildContext() {
return {theme: this.props.theme ? this.props.theme : this.getTheme()};
}
</s> add </s> remove else if(Array.isArray(this.props.children)) {
if(this.props.children[0] && (typeof this.props.children[0] == "string" || this.props.children[0].type == undefined))
return <TouchableOpacity {...this.prepareRootProps()} >
<Text style={this.getTextStyle()}>{this.props.children[0]}</Text>
<Text>
{this.props.children[1]}
</Text>
</TouchableOpacity>
else if(this.props.children[1] && (typeof this.props.children[1] == "string" || this.props.children[1].type == undefined))
return <TouchableOpacity {...this.prepareRootProps()} >
<Text>
{this.props.children[0]}
</Text>
<Text style={this.getTextStyle()}>{this.props.children[1]}</Text>
</TouchableOpacity>
else
return <TouchableOpacity {...this.prepareRootProps()} >
<Text>
{this.props.children[0]}
</Text>
<Text>
{this.props.children[1]}
</Text>
</TouchableOpacity>
}
</s> add if(typeof this.props.children == "string") {
return <Text style={this.getTextStyle()}>{this.props.children}</Text>
}
else if(Array.isArray(this.props.children)) {
var newChildren = [];
var childrenArray = React.Children.toArray(this.props.children);
var iconElement = [];
iconElement = _.remove(childrenArray, function(item) {
if(item.type == Icon) {
return true;
}
});
if(this.isIconRight()) {
newChildren.push(<Text style={this.getTextStyle()}>{childrenArray[0]}</Text>);
newChildren.push(<Text>{React.cloneElement(iconElement[0], this.getIconProps(iconElement[0]))}</Text>);
}
else if(this.isIconLeft() || iconElement) {
newChildren.push(<Text>{React.cloneElement(iconElement[0], this.getIconProps(iconElement[0]))}</Text>);
newChildren.push(<Text style={this.getTextStyle()}>{childrenArray[0]}</Text>);
}
return newChildren;
}
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9945be3b10107aac7762e55fa966d70c3f83eb93
|
Components/Widgets/Button.js
|
|
import Icon from './Icon';
import _ from 'lodash';
|
<mask> import NativeBaseComponent from '../Base/NativeBaseComponent';
<mask> import button from '../Styles/button';
<mask> import _ from 'lodash';
<mask> import computeProps from '../../Utils/computeProps';
<mask> import Icon from 'react-native-vector-icons/Ionicons';
<mask>
<mask>
<mask> export default class Button extends NativeBaseComponent {
<mask> static childContextTypes = {
<mask> theme: React.PropTypes.object
</s> default icon style, icon-left and icon-roght prop </s> remove import button from '../Styles/button';
import _ from 'lodash';
</s> add </s> remove import React, { Text, View, TouchableOpacity } from 'react-native';
</s> add import React, { Text, TouchableOpacity } from 'react-native'; </s> remove static childContextTypes = {
theme: React.PropTypes.object
}
getChildContext() {
return {theme: this.props.theme ? this.props.theme : this.getTheme()};
}
</s> add </s> remove if(typeof this.props.children == undefined || typeof this.props.children == "string") {
return <TouchableOpacity {...this.prepareRootProps()} >
<Text style={this.getTextStyle()}>{this.props.children}</Text>
</TouchableOpacity>
}
</s> add
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9945be3b10107aac7762e55fa966d70c3f83eb93
|
Components/Widgets/Button.js
|
<mask> import Icon from 'react-native-vector-icons/Ionicons';
<mask>
<mask>
<mask> export default class Button extends NativeBaseComponent {
<mask> static childContextTypes = {
<mask> theme: React.PropTypes.object
<mask> }
<mask>
<mask> getChildContext() {
<mask> return {theme: this.props.theme ? this.props.theme : this.getTheme()};
<mask> }
<mask>
<mask> getInitialStyle() {
<mask> return {
<mask> button: {
<mask> padding: 10,
</s> default icon style, icon-left and icon-roght prop </s> remove import Icon from 'react-native-vector-icons/Ionicons';
</s> add import Icon from './Icon';
import _ from 'lodash'; </s> remove import button from '../Styles/button';
import _ from 'lodash';
</s> add </s> remove import React, { Text, View, TouchableOpacity } from 'react-native';
</s> add import React, { Text, TouchableOpacity } from 'react-native'; </s> remove backgroundColor: this.getTheme().btnPrimaryBg,
</s> add backgroundColor: this.getTheme().btnPrimaryBg
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9945be3b10107aac7762e55fa966d70c3f83eb93
|
Components/Widgets/Button.js
|
|
backgroundColor: this.getTheme().btnPrimaryBg
|
<mask> padding: 10,
<mask> justifyContent: 'space-around',
<mask> flexDirection: 'row',
<mask> alignSelf: 'center',
<mask> backgroundColor: this.getTheme().btnPrimaryBg,
<mask> }
<mask> }
<mask> }
<mask> prepareRootProps() {
<mask>
</s> default icon style, icon-left and icon-roght prop </s> remove static childContextTypes = {
theme: React.PropTypes.object
}
getChildContext() {
return {theme: this.props.theme ? this.props.theme : this.getTheme()};
}
</s> add </s> remove alignSelf: (this.props.block) ? 'stretch' : 'flex-start',
</s> add alignSelf: (this.props.block) ? 'stretch' : 'flex-start' </s> remove return(this.renderChildren());
</s> add return(
<TouchableOpacity {...this.prepareRootProps()} >
{this.renderChildren()}
</TouchableOpacity>
); </s> remove else
return <TouchableOpacity {...this.prepareRootProps()} >
{this.props.children}
</TouchableOpacity>
</s> add else
return this.props.children
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9945be3b10107aac7762e55fa966d70c3f83eb93
|
Components/Widgets/Button.js
|
alignSelf: (this.props.block) ? 'stretch' : 'flex-start'
|
<mask> (this.props.warning) ? this.getTheme().btnWarningBg :
<mask> (this.props.info) ? this.getTheme().btnInfoBg :
<mask> this.getInitialStyle().button.backgroundColor,
<mask> height: (this.props.large) ? 60 : (this.props.small) ? 35 : 45,
<mask> alignSelf: (this.props.block) ? 'stretch' : 'flex-start',
<mask> }
<mask>
<mask> var addedProps = _.merge(this.getInitialStyle().button,type);
<mask>
<mask> var defaultProps = {
</s> default icon style, icon-left and icon-roght prop </s> remove var addedBtnProps = _.merge(this.getInitialStyle().buttonText,btnType);
return _.merge(mergedStyle, addedBtnProps, this.props.textStyle);
</s> add return _.merge(mergedStyle, btnType, this.props.textStyle);
}
getIconProps(icon) {
var defaultStyle = {
color: ((this.props.bordered) && (this.props.primary)) ? this.getTheme().btnPrimaryBg :
((this.props.bordered) && (this.props.success)) ? this.getTheme().btnSuccessBg :
((this.props.bordered) && (this.props.danger)) ? this.getTheme().btnDangerBg :
((this.props.bordered) && (this.props.warning)) ? this.getTheme().btnWarningBg :
((this.props.bordered) && (this.props.info)) ? this.getTheme().btnInfoBg :
this.getTheme().inverseTextColor,
fontSize: (this.props.large) ? this.getTheme().iconSizeLarge : (this.props.small) ? this.getTheme().iconSizeSmall : this.getTheme().iconFontSize,
}
console.log(this.props.small);
console.log(defaultStyle, "(*(&GHAGw");
var defaultProps = {
style: defaultStyle
}
return computeProps(icon.props, defaultProps); </s> remove static childContextTypes = {
theme: React.PropTypes.object
}
getChildContext() {
return {theme: this.props.theme ? this.props.theme : this.getTheme()};
}
</s> add </s> remove backgroundColor: this.getTheme().btnPrimaryBg,
</s> add backgroundColor: this.getTheme().btnPrimaryBg </s> remove else if(Array.isArray(this.props.children)) {
if(this.props.children[0] && (typeof this.props.children[0] == "string" || this.props.children[0].type == undefined))
return <TouchableOpacity {...this.prepareRootProps()} >
<Text style={this.getTextStyle()}>{this.props.children[0]}</Text>
<Text>
{this.props.children[1]}
</Text>
</TouchableOpacity>
else if(this.props.children[1] && (typeof this.props.children[1] == "string" || this.props.children[1].type == undefined))
return <TouchableOpacity {...this.prepareRootProps()} >
<Text>
{this.props.children[0]}
</Text>
<Text style={this.getTextStyle()}>{this.props.children[1]}</Text>
</TouchableOpacity>
else
return <TouchableOpacity {...this.prepareRootProps()} >
<Text>
{this.props.children[0]}
</Text>
<Text>
{this.props.children[1]}
</Text>
</TouchableOpacity>
}
</s> add if(typeof this.props.children == "string") {
return <Text style={this.getTextStyle()}>{this.props.children}</Text>
}
else if(Array.isArray(this.props.children)) {
var newChildren = [];
var childrenArray = React.Children.toArray(this.props.children);
var iconElement = [];
iconElement = _.remove(childrenArray, function(item) {
if(item.type == Icon) {
return true;
}
});
if(this.isIconRight()) {
newChildren.push(<Text style={this.getTextStyle()}>{childrenArray[0]}</Text>);
newChildren.push(<Text>{React.cloneElement(iconElement[0], this.getIconProps(iconElement[0]))}</Text>);
}
else if(this.isIconLeft() || iconElement) {
newChildren.push(<Text>{React.cloneElement(iconElement[0], this.getIconProps(iconElement[0]))}</Text>);
newChildren.push(<Text style={this.getTextStyle()}>{childrenArray[0]}</Text>);
}
return newChildren;
}
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9945be3b10107aac7762e55fa966d70c3f83eb93
|
Components/Widgets/Button.js
|
isIconLeft() {
var isIconLeft = false;
if (this.props['icon-left']) {
var isIconLeft = true;
}
return isIconLeft;
}
isIconRight() {
var isIconRight = false;
if (this.props['icon-right']) {
var isIconRight = true;
}
return isIconRight;
}
|
<mask>
<mask> }
<mask>
<mask> getTextStyle() {
<mask> var mergedStyle = {};
<mask>
<mask> var btnType = {
<mask> color: ((this.props.bordered) && (this.props.primary)) ? this.getTheme().btnPrimaryBg :
<mask> ((this.props.bordered) && (this.props.success)) ? this.getTheme().btnSuccessBg :
</s> default icon style, icon-left and icon-roght prop </s> remove var addedBtnProps = _.merge(this.getInitialStyle().buttonText,btnType);
return _.merge(mergedStyle, addedBtnProps, this.props.textStyle);
</s> add return _.merge(mergedStyle, btnType, this.props.textStyle);
}
getIconProps(icon) {
var defaultStyle = {
color: ((this.props.bordered) && (this.props.primary)) ? this.getTheme().btnPrimaryBg :
((this.props.bordered) && (this.props.success)) ? this.getTheme().btnSuccessBg :
((this.props.bordered) && (this.props.danger)) ? this.getTheme().btnDangerBg :
((this.props.bordered) && (this.props.warning)) ? this.getTheme().btnWarningBg :
((this.props.bordered) && (this.props.info)) ? this.getTheme().btnInfoBg :
this.getTheme().inverseTextColor,
fontSize: (this.props.large) ? this.getTheme().iconSizeLarge : (this.props.small) ? this.getTheme().iconSizeSmall : this.getTheme().iconFontSize,
}
console.log(this.props.small);
console.log(defaultStyle, "(*(&GHAGw");
var defaultProps = {
style: defaultStyle
}
return computeProps(icon.props, defaultProps); </s> remove alignSelf: (this.props.block) ? 'stretch' : 'flex-start',
</s> add alignSelf: (this.props.block) ? 'stretch' : 'flex-start' </s> remove static childContextTypes = {
theme: React.PropTypes.object
}
getChildContext() {
return {theme: this.props.theme ? this.props.theme : this.getTheme()};
}
</s> add </s> remove else if(Array.isArray(this.props.children)) {
if(this.props.children[0] && (typeof this.props.children[0] == "string" || this.props.children[0].type == undefined))
return <TouchableOpacity {...this.prepareRootProps()} >
<Text style={this.getTextStyle()}>{this.props.children[0]}</Text>
<Text>
{this.props.children[1]}
</Text>
</TouchableOpacity>
else if(this.props.children[1] && (typeof this.props.children[1] == "string" || this.props.children[1].type == undefined))
return <TouchableOpacity {...this.prepareRootProps()} >
<Text>
{this.props.children[0]}
</Text>
<Text style={this.getTextStyle()}>{this.props.children[1]}</Text>
</TouchableOpacity>
else
return <TouchableOpacity {...this.prepareRootProps()} >
<Text>
{this.props.children[0]}
</Text>
<Text>
{this.props.children[1]}
</Text>
</TouchableOpacity>
}
</s> add if(typeof this.props.children == "string") {
return <Text style={this.getTextStyle()}>{this.props.children}</Text>
}
else if(Array.isArray(this.props.children)) {
var newChildren = [];
var childrenArray = React.Children.toArray(this.props.children);
var iconElement = [];
iconElement = _.remove(childrenArray, function(item) {
if(item.type == Icon) {
return true;
}
});
if(this.isIconRight()) {
newChildren.push(<Text style={this.getTextStyle()}>{childrenArray[0]}</Text>);
newChildren.push(<Text>{React.cloneElement(iconElement[0], this.getIconProps(iconElement[0]))}</Text>);
}
else if(this.isIconLeft() || iconElement) {
newChildren.push(<Text>{React.cloneElement(iconElement[0], this.getIconProps(iconElement[0]))}</Text>);
newChildren.push(<Text style={this.getTextStyle()}>{childrenArray[0]}</Text>);
}
return newChildren;
} </s> remove backgroundColor: this.getTheme().btnPrimaryBg,
</s> add backgroundColor: this.getTheme().btnPrimaryBg
|
[
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9945be3b10107aac7762e55fa966d70c3f83eb93
|
Components/Widgets/Button.js
|
return _.merge(mergedStyle, btnType, this.props.textStyle);
}
getIconProps(icon) {
var defaultStyle = {
color: ((this.props.bordered) && (this.props.primary)) ? this.getTheme().btnPrimaryBg :
((this.props.bordered) && (this.props.success)) ? this.getTheme().btnSuccessBg :
((this.props.bordered) && (this.props.danger)) ? this.getTheme().btnDangerBg :
((this.props.bordered) && (this.props.warning)) ? this.getTheme().btnWarningBg :
((this.props.bordered) && (this.props.info)) ? this.getTheme().btnInfoBg :
this.getTheme().inverseTextColor,
fontSize: (this.props.large) ? this.getTheme().iconSizeLarge : (this.props.small) ? this.getTheme().iconSizeSmall : this.getTheme().iconFontSize,
}
console.log(this.props.small);
console.log(defaultStyle, "(*(&GHAGw");
var defaultProps = {
style: defaultStyle
}
return computeProps(icon.props, defaultProps);
|
<mask> fontSize: (this.props.large) ? this.getTheme().btnTextSizeLarge : (this.props.small) ? this.getTheme().btnTextSizeSmall : this.getTheme().btnTextSize,
<mask> lineHeight: (this.props.large) ? 32 : (this.props.small) ? 15 : 22
<mask> }
<mask>
<mask> var addedBtnProps = _.merge(this.getInitialStyle().buttonText,btnType);
<mask> return _.merge(mergedStyle, addedBtnProps, this.props.textStyle);
<mask> }
<mask>
<mask> renderChildren() {
<mask> if(typeof this.props.children == undefined || typeof this.props.children == "string") {
<mask> return <TouchableOpacity {...this.prepareRootProps()} >
</s> default icon style, icon-left and icon-roght prop </s> remove if(typeof this.props.children == undefined || typeof this.props.children == "string") {
return <TouchableOpacity {...this.prepareRootProps()} >
<Text style={this.getTextStyle()}>{this.props.children}</Text>
</TouchableOpacity>
}
</s> add </s> remove alignSelf: (this.props.block) ? 'stretch' : 'flex-start',
</s> add alignSelf: (this.props.block) ? 'stretch' : 'flex-start' </s> remove else if(Array.isArray(this.props.children)) {
if(this.props.children[0] && (typeof this.props.children[0] == "string" || this.props.children[0].type == undefined))
return <TouchableOpacity {...this.prepareRootProps()} >
<Text style={this.getTextStyle()}>{this.props.children[0]}</Text>
<Text>
{this.props.children[1]}
</Text>
</TouchableOpacity>
else if(this.props.children[1] && (typeof this.props.children[1] == "string" || this.props.children[1].type == undefined))
return <TouchableOpacity {...this.prepareRootProps()} >
<Text>
{this.props.children[0]}
</Text>
<Text style={this.getTextStyle()}>{this.props.children[1]}</Text>
</TouchableOpacity>
else
return <TouchableOpacity {...this.prepareRootProps()} >
<Text>
{this.props.children[0]}
</Text>
<Text>
{this.props.children[1]}
</Text>
</TouchableOpacity>
}
</s> add if(typeof this.props.children == "string") {
return <Text style={this.getTextStyle()}>{this.props.children}</Text>
}
else if(Array.isArray(this.props.children)) {
var newChildren = [];
var childrenArray = React.Children.toArray(this.props.children);
var iconElement = [];
iconElement = _.remove(childrenArray, function(item) {
if(item.type == Icon) {
return true;
}
});
if(this.isIconRight()) {
newChildren.push(<Text style={this.getTextStyle()}>{childrenArray[0]}</Text>);
newChildren.push(<Text>{React.cloneElement(iconElement[0], this.getIconProps(iconElement[0]))}</Text>);
}
else if(this.isIconLeft() || iconElement) {
newChildren.push(<Text>{React.cloneElement(iconElement[0], this.getIconProps(iconElement[0]))}</Text>);
newChildren.push(<Text style={this.getTextStyle()}>{childrenArray[0]}</Text>);
}
return newChildren;
} </s> remove static childContextTypes = {
theme: React.PropTypes.object
}
getChildContext() {
return {theme: this.props.theme ? this.props.theme : this.getTheme()};
}
</s> add
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9945be3b10107aac7762e55fa966d70c3f83eb93
|
Components/Widgets/Button.js
|
<mask> return _.merge(mergedStyle, addedBtnProps, this.props.textStyle);
<mask> }
<mask>
<mask> renderChildren() {
<mask> if(typeof this.props.children == undefined || typeof this.props.children == "string") {
<mask> return <TouchableOpacity {...this.prepareRootProps()} >
<mask> <Text style={this.getTextStyle()}>{this.props.children}</Text>
<mask> </TouchableOpacity>
<mask> }
<mask>
<mask> else if(Array.isArray(this.props.children)) {
<mask> if(this.props.children[0] && (typeof this.props.children[0] == "string" || this.props.children[0].type == undefined))
<mask> return <TouchableOpacity {...this.prepareRootProps()} >
<mask> <Text style={this.getTextStyle()}>{this.props.children[0]}</Text>
</s> default icon style, icon-left and icon-roght prop </s> remove else if(Array.isArray(this.props.children)) {
if(this.props.children[0] && (typeof this.props.children[0] == "string" || this.props.children[0].type == undefined))
return <TouchableOpacity {...this.prepareRootProps()} >
<Text style={this.getTextStyle()}>{this.props.children[0]}</Text>
<Text>
{this.props.children[1]}
</Text>
</TouchableOpacity>
else if(this.props.children[1] && (typeof this.props.children[1] == "string" || this.props.children[1].type == undefined))
return <TouchableOpacity {...this.prepareRootProps()} >
<Text>
{this.props.children[0]}
</Text>
<Text style={this.getTextStyle()}>{this.props.children[1]}</Text>
</TouchableOpacity>
else
return <TouchableOpacity {...this.prepareRootProps()} >
<Text>
{this.props.children[0]}
</Text>
<Text>
{this.props.children[1]}
</Text>
</TouchableOpacity>
}
</s> add if(typeof this.props.children == "string") {
return <Text style={this.getTextStyle()}>{this.props.children}</Text>
}
else if(Array.isArray(this.props.children)) {
var newChildren = [];
var childrenArray = React.Children.toArray(this.props.children);
var iconElement = [];
iconElement = _.remove(childrenArray, function(item) {
if(item.type == Icon) {
return true;
}
});
if(this.isIconRight()) {
newChildren.push(<Text style={this.getTextStyle()}>{childrenArray[0]}</Text>);
newChildren.push(<Text>{React.cloneElement(iconElement[0], this.getIconProps(iconElement[0]))}</Text>);
}
else if(this.isIconLeft() || iconElement) {
newChildren.push(<Text>{React.cloneElement(iconElement[0], this.getIconProps(iconElement[0]))}</Text>);
newChildren.push(<Text style={this.getTextStyle()}>{childrenArray[0]}</Text>);
}
return newChildren;
} </s> remove var addedBtnProps = _.merge(this.getInitialStyle().buttonText,btnType);
return _.merge(mergedStyle, addedBtnProps, this.props.textStyle);
</s> add return _.merge(mergedStyle, btnType, this.props.textStyle);
}
getIconProps(icon) {
var defaultStyle = {
color: ((this.props.bordered) && (this.props.primary)) ? this.getTheme().btnPrimaryBg :
((this.props.bordered) && (this.props.success)) ? this.getTheme().btnSuccessBg :
((this.props.bordered) && (this.props.danger)) ? this.getTheme().btnDangerBg :
((this.props.bordered) && (this.props.warning)) ? this.getTheme().btnWarningBg :
((this.props.bordered) && (this.props.info)) ? this.getTheme().btnInfoBg :
this.getTheme().inverseTextColor,
fontSize: (this.props.large) ? this.getTheme().iconSizeLarge : (this.props.small) ? this.getTheme().iconSizeSmall : this.getTheme().iconFontSize,
}
console.log(this.props.small);
console.log(defaultStyle, "(*(&GHAGw");
var defaultProps = {
style: defaultStyle
}
return computeProps(icon.props, defaultProps); </s> remove else
return <TouchableOpacity {...this.prepareRootProps()} >
{this.props.children}
</TouchableOpacity>
</s> add else
return this.props.children
</s> remove return(this.renderChildren());
</s> add return(
<TouchableOpacity {...this.prepareRootProps()} >
{this.renderChildren()}
</TouchableOpacity>
);
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9945be3b10107aac7762e55fa966d70c3f83eb93
|
Components/Widgets/Button.js
|
|
if(typeof this.props.children == "string") {
return <Text style={this.getTextStyle()}>{this.props.children}</Text>
}
else if(Array.isArray(this.props.children)) {
var newChildren = [];
var childrenArray = React.Children.toArray(this.props.children);
var iconElement = [];
iconElement = _.remove(childrenArray, function(item) {
if(item.type == Icon) {
return true;
}
});
if(this.isIconRight()) {
newChildren.push(<Text style={this.getTextStyle()}>{childrenArray[0]}</Text>);
newChildren.push(<Text>{React.cloneElement(iconElement[0], this.getIconProps(iconElement[0]))}</Text>);
}
else if(this.isIconLeft() || iconElement) {
newChildren.push(<Text>{React.cloneElement(iconElement[0], this.getIconProps(iconElement[0]))}</Text>);
newChildren.push(<Text style={this.getTextStyle()}>{childrenArray[0]}</Text>);
}
return newChildren;
}
|
<mask> <Text style={this.getTextStyle()}>{this.props.children}</Text>
<mask> </TouchableOpacity>
<mask> }
<mask>
<mask> else if(Array.isArray(this.props.children)) {
<mask> if(this.props.children[0] && (typeof this.props.children[0] == "string" || this.props.children[0].type == undefined))
<mask> return <TouchableOpacity {...this.prepareRootProps()} >
<mask> <Text style={this.getTextStyle()}>{this.props.children[0]}</Text>
<mask> <Text>
<mask> {this.props.children[1]}
<mask> </Text>
<mask> </TouchableOpacity>
<mask>
<mask> else if(this.props.children[1] && (typeof this.props.children[1] == "string" || this.props.children[1].type == undefined))
<mask> return <TouchableOpacity {...this.prepareRootProps()} >
<mask> <Text>
<mask> {this.props.children[0]}
<mask> </Text>
<mask> <Text style={this.getTextStyle()}>{this.props.children[1]}</Text>
<mask> </TouchableOpacity>
<mask>
<mask> else
<mask> return <TouchableOpacity {...this.prepareRootProps()} >
<mask> <Text>
<mask> {this.props.children[0]}
<mask> </Text>
<mask> <Text>
<mask> {this.props.children[1]}
<mask> </Text>
<mask> </TouchableOpacity>
<mask> }
<mask>
<mask> else
<mask> return <TouchableOpacity {...this.prepareRootProps()} >
<mask> {this.props.children}
<mask> </TouchableOpacity>
</s> default icon style, icon-left and icon-roght prop </s> remove if(typeof this.props.children == undefined || typeof this.props.children == "string") {
return <TouchableOpacity {...this.prepareRootProps()} >
<Text style={this.getTextStyle()}>{this.props.children}</Text>
</TouchableOpacity>
}
</s> add </s> remove else
return <TouchableOpacity {...this.prepareRootProps()} >
{this.props.children}
</TouchableOpacity>
</s> add else
return this.props.children
</s> remove return(this.renderChildren());
</s> add return(
<TouchableOpacity {...this.prepareRootProps()} >
{this.renderChildren()}
</TouchableOpacity>
); </s> remove var addedBtnProps = _.merge(this.getInitialStyle().buttonText,btnType);
return _.merge(mergedStyle, addedBtnProps, this.props.textStyle);
</s> add return _.merge(mergedStyle, btnType, this.props.textStyle);
}
getIconProps(icon) {
var defaultStyle = {
color: ((this.props.bordered) && (this.props.primary)) ? this.getTheme().btnPrimaryBg :
((this.props.bordered) && (this.props.success)) ? this.getTheme().btnSuccessBg :
((this.props.bordered) && (this.props.danger)) ? this.getTheme().btnDangerBg :
((this.props.bordered) && (this.props.warning)) ? this.getTheme().btnWarningBg :
((this.props.bordered) && (this.props.info)) ? this.getTheme().btnInfoBg :
this.getTheme().inverseTextColor,
fontSize: (this.props.large) ? this.getTheme().iconSizeLarge : (this.props.small) ? this.getTheme().iconSizeSmall : this.getTheme().iconFontSize,
}
console.log(this.props.small);
console.log(defaultStyle, "(*(&GHAGw");
var defaultProps = {
style: defaultStyle
}
return computeProps(icon.props, defaultProps);
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9945be3b10107aac7762e55fa966d70c3f83eb93
|
Components/Widgets/Button.js
|
else
return this.props.children
|
<mask> </Text>
<mask> </TouchableOpacity>
<mask> }
<mask>
<mask> else
<mask> return <TouchableOpacity {...this.prepareRootProps()} >
<mask> {this.props.children}
<mask> </TouchableOpacity>
<mask> }
<mask>
<mask> render() {
<mask> return(this.renderChildren());
<mask> }
</s> default icon style, icon-left and icon-roght prop </s> remove return(this.renderChildren());
</s> add return(
<TouchableOpacity {...this.prepareRootProps()} >
{this.renderChildren()}
</TouchableOpacity>
); </s> remove else if(Array.isArray(this.props.children)) {
if(this.props.children[0] && (typeof this.props.children[0] == "string" || this.props.children[0].type == undefined))
return <TouchableOpacity {...this.prepareRootProps()} >
<Text style={this.getTextStyle()}>{this.props.children[0]}</Text>
<Text>
{this.props.children[1]}
</Text>
</TouchableOpacity>
else if(this.props.children[1] && (typeof this.props.children[1] == "string" || this.props.children[1].type == undefined))
return <TouchableOpacity {...this.prepareRootProps()} >
<Text>
{this.props.children[0]}
</Text>
<Text style={this.getTextStyle()}>{this.props.children[1]}</Text>
</TouchableOpacity>
else
return <TouchableOpacity {...this.prepareRootProps()} >
<Text>
{this.props.children[0]}
</Text>
<Text>
{this.props.children[1]}
</Text>
</TouchableOpacity>
}
</s> add if(typeof this.props.children == "string") {
return <Text style={this.getTextStyle()}>{this.props.children}</Text>
}
else if(Array.isArray(this.props.children)) {
var newChildren = [];
var childrenArray = React.Children.toArray(this.props.children);
var iconElement = [];
iconElement = _.remove(childrenArray, function(item) {
if(item.type == Icon) {
return true;
}
});
if(this.isIconRight()) {
newChildren.push(<Text style={this.getTextStyle()}>{childrenArray[0]}</Text>);
newChildren.push(<Text>{React.cloneElement(iconElement[0], this.getIconProps(iconElement[0]))}</Text>);
}
else if(this.isIconLeft() || iconElement) {
newChildren.push(<Text>{React.cloneElement(iconElement[0], this.getIconProps(iconElement[0]))}</Text>);
newChildren.push(<Text style={this.getTextStyle()}>{childrenArray[0]}</Text>);
}
return newChildren;
} </s> remove if(typeof this.props.children == undefined || typeof this.props.children == "string") {
return <TouchableOpacity {...this.prepareRootProps()} >
<Text style={this.getTextStyle()}>{this.props.children}</Text>
</TouchableOpacity>
}
</s> add </s> remove var addedBtnProps = _.merge(this.getInitialStyle().buttonText,btnType);
return _.merge(mergedStyle, addedBtnProps, this.props.textStyle);
</s> add return _.merge(mergedStyle, btnType, this.props.textStyle);
}
getIconProps(icon) {
var defaultStyle = {
color: ((this.props.bordered) && (this.props.primary)) ? this.getTheme().btnPrimaryBg :
((this.props.bordered) && (this.props.success)) ? this.getTheme().btnSuccessBg :
((this.props.bordered) && (this.props.danger)) ? this.getTheme().btnDangerBg :
((this.props.bordered) && (this.props.warning)) ? this.getTheme().btnWarningBg :
((this.props.bordered) && (this.props.info)) ? this.getTheme().btnInfoBg :
this.getTheme().inverseTextColor,
fontSize: (this.props.large) ? this.getTheme().iconSizeLarge : (this.props.small) ? this.getTheme().iconSizeSmall : this.getTheme().iconFontSize,
}
console.log(this.props.small);
console.log(defaultStyle, "(*(&GHAGw");
var defaultProps = {
style: defaultStyle
}
return computeProps(icon.props, defaultProps);
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9945be3b10107aac7762e55fa966d70c3f83eb93
|
Components/Widgets/Button.js
|
return(
<TouchableOpacity {...this.prepareRootProps()} >
{this.renderChildren()}
</TouchableOpacity>
);
|
<mask> </TouchableOpacity>
<mask> }
<mask>
<mask> render() {
<mask> return(this.renderChildren());
<mask> }
<mask>
<mask> }
</s> default icon style, icon-left and icon-roght prop </s> remove else
return <TouchableOpacity {...this.prepareRootProps()} >
{this.props.children}
</TouchableOpacity>
</s> add else
return this.props.children
</s> remove else if(Array.isArray(this.props.children)) {
if(this.props.children[0] && (typeof this.props.children[0] == "string" || this.props.children[0].type == undefined))
return <TouchableOpacity {...this.prepareRootProps()} >
<Text style={this.getTextStyle()}>{this.props.children[0]}</Text>
<Text>
{this.props.children[1]}
</Text>
</TouchableOpacity>
else if(this.props.children[1] && (typeof this.props.children[1] == "string" || this.props.children[1].type == undefined))
return <TouchableOpacity {...this.prepareRootProps()} >
<Text>
{this.props.children[0]}
</Text>
<Text style={this.getTextStyle()}>{this.props.children[1]}</Text>
</TouchableOpacity>
else
return <TouchableOpacity {...this.prepareRootProps()} >
<Text>
{this.props.children[0]}
</Text>
<Text>
{this.props.children[1]}
</Text>
</TouchableOpacity>
}
</s> add if(typeof this.props.children == "string") {
return <Text style={this.getTextStyle()}>{this.props.children}</Text>
}
else if(Array.isArray(this.props.children)) {
var newChildren = [];
var childrenArray = React.Children.toArray(this.props.children);
var iconElement = [];
iconElement = _.remove(childrenArray, function(item) {
if(item.type == Icon) {
return true;
}
});
if(this.isIconRight()) {
newChildren.push(<Text style={this.getTextStyle()}>{childrenArray[0]}</Text>);
newChildren.push(<Text>{React.cloneElement(iconElement[0], this.getIconProps(iconElement[0]))}</Text>);
}
else if(this.isIconLeft() || iconElement) {
newChildren.push(<Text>{React.cloneElement(iconElement[0], this.getIconProps(iconElement[0]))}</Text>);
newChildren.push(<Text style={this.getTextStyle()}>{childrenArray[0]}</Text>);
}
return newChildren;
} </s> remove if(typeof this.props.children == undefined || typeof this.props.children == "string") {
return <TouchableOpacity {...this.prepareRootProps()} >
<Text style={this.getTextStyle()}>{this.props.children}</Text>
</TouchableOpacity>
}
</s> add </s> remove backgroundColor: this.getTheme().btnPrimaryBg,
</s> add backgroundColor: this.getTheme().btnPrimaryBg
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/9945be3b10107aac7762e55fa966d70c3f83eb93
|
Components/Widgets/Button.js
|
<mask> import View from './View';
<mask> import Button from './Button';
<mask> import Thumbnail from './Thumbnail';
<mask>
<mask> var keyIndex = 0;
<mask>
<mask> export default class CardItemNB extends NativeBaseComponent {
<mask>
<mask> getInitialStyle() {
<mask> return {
<mask> listItem: {
</s> fix issues arising from component keys </s> remove var keyIndex = 0;
</s> add </s> remove var keyIndex = 0;
</s> add </s> remove newChildren = React.Children.map(this.props.children, (child) => {
return React.cloneElement(child, this.getChildProps(child));
</s> add newChildren = React.Children.map(this.props.children, (child, i) => {
return React.cloneElement(child, {...this.getChildProps(child), key: i}); </s> remove newChildren.push(React.cloneElement(iconElement[0], this.getChildProps(iconElement[0])));
</s> add newChildren.push(React.cloneElement(iconElement[0], {...this.getChildProps(iconElement[0]), key: 'listItem1'}));
</s> remove key: keyIndex++
</s> add key: 'inpGroup'
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/CardItem.js
|
|
style: this.getInitialStyle().fullImage
|
<mask> var defaultProps = {};
<mask> if(child.type == Image && !Array.isArray(this.props.children)) {
<mask> defaultProps = {
<mask> resizeMode: 'stretch',
<mask> style: this.getInitialStyle().fullImage,
<mask> key: keyIndex++
<mask> }
<mask> }
<mask> else if(child.type == Button) {
<mask> defaultProps = {
<mask> small: true,
</s> fix issues arising from component keys </s> remove style: this.getInitialStyle().fullImage,
key: keyIndex++
</s> add style: this.getInitialStyle().fullImage
</s> remove style: this.getInitialStyle().itemButton,
key: keyIndex++
</s> add style: this.getInitialStyle().itemButton
</s> remove style: this.getInitialStyle().itemButton,
key: keyIndex++
</s> add style: this.getInitialStyle().itemButton </s> remove style: this.getInitialStyle().thumbnail,
key: keyIndex++
</s> add style: this.getInitialStyle().thumbnail </s> remove style: this.getInitialStyle().fullImage,
key: keyIndex++
</s> add style: this.getInitialStyle().fullImage
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/CardItem.js
|
style: this.getInitialStyle().itemButton
|
<mask> }
<mask> else if(child.type == Button) {
<mask> defaultProps = {
<mask> small: true,
<mask> style: this.getInitialStyle().itemButton,
<mask> key: keyIndex++
<mask> }
<mask> }
<mask> else if(child.type == Text) {
<mask> if ((this.props.header) || (this.props.footer)) {
<mask> defaultProps = {
</s> fix issues arising from component keys </s> remove style: this.getInitialStyle().itemButton,
key: keyIndex++
</s> add style: this.getInitialStyle().itemButton
</s> remove style: this.getInitialStyle().dividerItemText,
key: keyIndex++
</s> add style: this.getInitialStyle().dividerItemText </s> remove style: this.getInitialStyle().fullImage,
key: keyIndex++
</s> add style: this.getInitialStyle().fullImage
</s> remove style: this.getInitialStyle().fullImage,
key: keyIndex++
</s> add style: this.getInitialStyle().fullImage </s> remove style: this.getInitialStyle().dividerItemText,
key: keyIndex++
</s> add style: this.getInitialStyle().dividerItemText
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/CardItem.js
|
style: this.getInitialStyle().dividerItemText
|
<mask> }
<mask> else if(child.type == Text) {
<mask> if ((this.props.header) || (this.props.footer)) {
<mask> defaultProps = {
<mask> style: this.getInitialStyle().dividerItemText,
<mask> key: keyIndex++
<mask> }
<mask> }
<mask> else {
<mask> if(child.props.note && this.thumbnailPresent()) {
<mask> defaultProps = {
</s> fix issues arising from component keys </s> remove style: this.getInitialStyle().dividerItemText,
key: keyIndex++
</s> add style: this.getInitialStyle().dividerItemText
</s> remove style: this.getInitialStyle().itemButton,
key: keyIndex++
</s> add style: this.getInitialStyle().itemButton </s> remove style: this.getInitialStyle().itemSubNote,
key: keyIndex++
</s> add style: this.getInitialStyle().itemSubNote
</s> remove style: this.getInitialStyle().itemSubNote,
key: keyIndex++
</s> add style: this.getInitialStyle().itemSubNote </s> remove style: this.getInitialStyle().listItemDivider,
key: keyIndex++
</s> add style: this.getInitialStyle().listItemDivider
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/CardItem.js
|
style: this.getInitialStyle().itemSubNote
|
<mask> }
<mask> else {
<mask> if(child.props.note && this.thumbnailPresent()) {
<mask> defaultProps = {
<mask> style: this.getInitialStyle().itemSubNote,
<mask> key: keyIndex++
<mask> }
<mask> }
<mask> else if(child.props.note) {
<mask> defaultProps = {
<mask> style: this.getInitialStyle().itemNote,
</s> fix issues arising from component keys </s> remove style: this.getInitialStyle().itemSubNote,
key: keyIndex++
</s> add style: this.getInitialStyle().itemSubNote
</s> remove style: this.getInitialStyle().dividerItemText,
key: keyIndex++
</s> add style: this.getInitialStyle().dividerItemText
</s> remove style: this.getInitialStyle().itemNote,
key: keyIndex++
</s> add style: this.getInitialStyle().itemNote </s> remove style: this.getInitialStyle().itemNote,
key: keyIndex++
</s> add style: this.getInitialStyle().itemNote </s> remove style: this.getInitialStyle().dividerItemText,
key: keyIndex++
</s> add style: this.getInitialStyle().dividerItemText
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/CardItem.js
|
style: this.getInitialStyle().itemNote
|
<mask> }
<mask> }
<mask> else if(child.props.note) {
<mask> defaultProps = {
<mask> style: this.getInitialStyle().itemNote,
<mask> key: keyIndex++
<mask> }
<mask> }
<mask> else {
<mask> defaultProps = {
<mask> style: this.getInitialStyle().itemText,
</s> fix issues arising from component keys </s> remove style: this.getInitialStyle().itemNote,
key: keyIndex++
</s> add style: this.getInitialStyle().itemNote </s> remove style: this.getInitialStyle().itemSubNote,
key: keyIndex++
</s> add style: this.getInitialStyle().itemSubNote
</s> remove style: this.getInitialStyle().itemSubNote,
key: keyIndex++
</s> add style: this.getInitialStyle().itemSubNote </s> remove style: this.getInitialStyle().itemText,
key: keyIndex++
</s> add style: this.getInitialStyle().itemText </s> remove style: this.getInitialStyle().itemText,
key: keyIndex++
</s> add style: this.getInitialStyle().itemText
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/CardItem.js
|
style: this.getInitialStyle().itemText
|
<mask> }
<mask> }
<mask> else {
<mask> defaultProps = {
<mask> style: this.getInitialStyle().itemText,
<mask> key: keyIndex++
<mask> }
<mask> }
<mask> }
<mask> }
<mask> else if(child.type == Icon) {
</s> fix issues arising from component keys </s> remove style: this.getInitialStyle().itemIcon,
key: keyIndex++
</s> add style: this.getInitialStyle().itemIcon </s> remove style: this.getInitialStyle().itemIcon,
key: keyIndex++
</s> add style: this.getInitialStyle().itemIcon </s> remove style: this.getInitialStyle().itemText,
key: keyIndex++
</s> add style: this.getInitialStyle().itemText
</s> remove style: this.getInitialStyle().itemNote,
key: keyIndex++
</s> add style: this.getInitialStyle().itemNote </s> remove style: this.getInitialStyle().itemNote,
key: keyIndex++
</s> add style: this.getInitialStyle().itemNote
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/CardItem.js
|
style: this.getInitialStyle().itemIcon
|
<mask> }
<mask> }
<mask> else if(child.type == Icon) {
<mask> defaultProps = {
<mask> style: this.getInitialStyle().itemIcon,
<mask> key: keyIndex++
<mask> }
<mask> }
<mask> else if(child.type == Thumbnail) {
<mask> defaultProps = {
<mask> style: this.getInitialStyle().thumbnail,
</s> fix issues arising from component keys </s> remove style: this.getInitialStyle().itemIcon,
key: keyIndex++
</s> add style: this.getInitialStyle().itemIcon </s> remove style: this.getInitialStyle().thumbnail,
key: keyIndex++
</s> add style: this.getInitialStyle().thumbnail </s> remove style: this.getInitialStyle().thumbnail,
key: keyIndex++
</s> add style: this.getInitialStyle().thumbnail
</s> remove style: this.getInitialStyle().itemText,
key: keyIndex++
</s> add style: this.getInitialStyle().itemText </s> remove style: this.getInitialStyle().itemButton,
key: keyIndex++
</s> add style: this.getInitialStyle().itemButton
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/CardItem.js
|
style: this.getInitialStyle().thumbnail
|
<mask> }
<mask> }
<mask> else if(child.type == Thumbnail) {
<mask> defaultProps = {
<mask> style: this.getInitialStyle().thumbnail,
<mask> key: keyIndex++
<mask> }
<mask> }
<mask> else if(child.type == Image ) {
<mask> defaultProps = {
<mask> style: this.getInitialStyle().fullImage,
</s> fix issues arising from component keys </s> remove style: this.getInitialStyle().fullImage,
key: keyIndex++
</s> add style: this.getInitialStyle().fullImage </s> remove style: this.getInitialStyle().itemIcon,
key: keyIndex++
</s> add style: this.getInitialStyle().itemIcon </s> remove style: this.getInitialStyle().itemIcon,
key: keyIndex++
</s> add style: this.getInitialStyle().itemIcon </s> remove style: this.getInitialStyle().thumbnail,
key: keyIndex++
</s> add style: this.getInitialStyle().thumbnail
</s> remove style: this.getInitialStyle().fullImage,
key: keyIndex++
</s> add style: this.getInitialStyle().fullImage
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/CardItem.js
|
style: this.getInitialStyle().fullImage
|
<mask> }
<mask> }
<mask> else if(child.type == Image ) {
<mask> defaultProps = {
<mask> style: this.getInitialStyle().fullImage,
<mask> key: keyIndex++
<mask> }
<mask> }
<mask> else {
<mask> defaultProps = {
<mask> foregroundColor: this.getContextForegroundColor(),
</s> fix issues arising from component keys </s> remove style: this.getInitialStyle().thumbnail,
key: keyIndex++
</s> add style: this.getInitialStyle().thumbnail </s> remove style: this.getInitialStyle().thumbnail,
key: keyIndex++
</s> add style: this.getInitialStyle().thumbnail
</s> remove foregroundColor: this.getContextForegroundColor(),
key: keyIndex++
</s> add foregroundColor: this.getContextForegroundColor()
</s> remove style: this.getInitialStyle().fullImage,
key: keyIndex++
</s> add style: this.getInitialStyle().fullImage
</s> remove style: this.getInitialStyle().fullImage,
key: keyIndex++
</s> add style: this.getInitialStyle().fullImage
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/CardItem.js
|
foregroundColor: this.getContextForegroundColor()
|
<mask> }
<mask> }
<mask> else {
<mask> defaultProps = {
<mask> foregroundColor: this.getContextForegroundColor(),
<mask> key: keyIndex++
<mask> }
<mask> }
<mask>
<mask> return computeProps(child.props, defaultProps);
<mask> }
</s> fix issues arising from component keys </s> remove foregroundColor: this.getContextForegroundColor(),
key: keyIndex++
</s> add foregroundColor: this.getContextForegroundColor() </s> remove style: this.getInitialStyle().thumbnail,
key: keyIndex++
</s> add style: this.getInitialStyle().thumbnail
</s> remove style: this.getInitialStyle().fullImage,
key: keyIndex++
</s> add style: this.getInitialStyle().fullImage </s> remove foregroundColor: this.getContextForegroundColor(),
key: keyIndex++
</s> add foregroundColor: this.getContextForegroundColor()
</s> remove style: this.getInitialStyle().listItem,
key: keyIndex++
</s> add style: this.getInitialStyle().listItem
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/CardItem.js
|
style: this.getInitialStyle().listItemDivider
|
<mask>
<mask> if((this.props.header) || (this.props.footer)) {
<mask>
<mask> defaultProps = {
<mask> style: this.getInitialStyle().listItemDivider,
<mask> key: keyIndex++
<mask> };
<mask> }
<mask>
<mask> else {
<mask> defaultProps = {
</s> fix issues arising from component keys </s> remove style: this.getInitialStyle().dividerItemText,
key: keyIndex++
</s> add style: this.getInitialStyle().dividerItemText </s> remove style: this.getInitialStyle().itemButton,
key: keyIndex++
</s> add style: this.getInitialStyle().itemButton </s> remove style: this.getInitialStyle().listItemDivider,
key: keyIndex++
</s> add style: this.getInitialStyle().listItemDivider
</s> remove style: this.getInitialStyle().listItem,
key: keyIndex++
</s> add style: this.getInitialStyle().listItem </s> remove style: this.getInitialStyle().listItem,
key: keyIndex++
</s> add style: this.getInitialStyle().listItem
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/CardItem.js
|
style: this.getInitialStyle().listItem
|
<mask> }
<mask>
<mask> else {
<mask> defaultProps = {
<mask> style: this.getInitialStyle().listItem,
<mask> key: keyIndex++
<mask> };
<mask> }
<mask>
<mask> return computeProps(this.props, defaultProps);
<mask> }
</s> fix issues arising from component keys </s> remove style: this.getInitialStyle().listItem,
key: keyIndex++
</s> add style: this.getInitialStyle().listItem
</s> remove key: keyIndex++
</s> add key: 'inpGroup' </s> remove foregroundColor: this.getContextForegroundColor(),
key: keyIndex++
</s> add foregroundColor: this.getContextForegroundColor() </s> remove foregroundColor: this.getContextForegroundColor(),
key: keyIndex++
</s> add foregroundColor: this.getContextForegroundColor() </s> remove style: this.getInitialStyle().listItemDivider,
key: keyIndex++
</s> add style: this.getInitialStyle().listItemDivider
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/CardItem.js
|
newChildren = React.Children.map(this.props.children, (child, i) => {
return React.cloneElement(child, {...this.getChildProps(child), key: i});
|
<mask> var newChildren = [];
<mask>
<mask> if(!this.thumbnailPresent() && !this.iconPresent()) {
<mask>
<mask> newChildren = React.Children.map(this.props.children, (child) => {
<mask> return React.cloneElement(child, this.getChildProps(child));
<mask> });
<mask> }
<mask> else {
<mask> newChildren = [];
<mask> if(!Array.isArray(this.props.children)) {
</s> fix issues arising from component keys </s> remove <View key={keyIndex++} style={{justifyContent: 'flex-start'}}>
</s> add <View key='cardItem' style={{justifyContent: 'flex-start'}}> </s> remove <View key={keyIndex++} style={{alignSelf: 'stretch', flex:1}}>
</s> add <View key='listItem' style={{alignSelf: 'stretch', flex:1}}>
</s> remove newChildren.push(React.cloneElement(iconElement[0], this.getChildProps(iconElement[0])));
</s> add newChildren.push(React.cloneElement(iconElement[0], {...this.getChildProps(iconElement[0]), key: 'listItem1'}));
</s> remove newChildren.push(<View key={keyIndex++} >
{childrenArray.map((child) => {
return React.cloneElement(child, this.getChildProps(child));
</s> add newChildren.push(<View key='listItem0' >
{childrenArray.map((child, i) => {
return React.cloneElement(child, {...this.getChildProps(child), key: i});
</s> remove newChildren.push(React.cloneElement(badgeElement[0], this.getChildProps(badgeElement[0])));
</s> add newChildren.push(React.cloneElement(badgeElement[0], {...this.getChildProps(badgeElement[0]), key: 'listItem1'}));
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/CardItem.js
|
<View key='cardItem' style={{justifyContent: 'flex-start'}}>
|
<mask> else {
<mask> newChildren = [];
<mask> if(!Array.isArray(this.props.children)) {
<mask> newChildren.push(
<mask> <View key={keyIndex++} style={{justifyContent: 'flex-start'}}>
<mask> {React.cloneElement(this.props.children, this.getChildProps(this.props.children))}
<mask> </View>
<mask> );
<mask> }
<mask> else {
</s> fix issues arising from component keys </s> remove <View key={keyIndex++} style={{alignSelf: 'stretch', flex:1}}>
</s> add <View key='listItem' style={{alignSelf: 'stretch', flex:1}}>
</s> remove newChildren = React.Children.map(this.props.children, (child) => {
return React.cloneElement(child, this.getChildProps(child));
</s> add newChildren = React.Children.map(this.props.children, (child, i) => {
return React.cloneElement(child, {...this.getChildProps(child), key: i}); </s> remove <View key={keyIndex++} style={ this.notePresent() ? this.getRightStyle().right : this.squareThumbs() ? this.getRightStyle().right3 : this.getRightStyle().right2 }>
{childrenArray.slice(1).map((child) => {
return React.cloneElement(child, this.getChildProps(child));
</s> add <View key='cardItem' style={ this.notePresent() ? this.getRightStyle().right : this.squareThumbs() ? this.getRightStyle().right3 : this.getRightStyle().right2 }>
{childrenArray.slice(1).map((child, i) => {
return React.cloneElement(child, {...this.getChildProps(child), key: i}); </s> remove style: this.getInitialStyle().itemNote,
key: keyIndex++
</s> add style: this.getInitialStyle().itemNote </s> remove style: this.getInitialStyle().itemNote,
key: keyIndex++
</s> add style: this.getInitialStyle().itemNote
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/CardItem.js
|
<View key='cardItem' style={ this.notePresent() ? this.getRightStyle().right : this.squareThumbs() ? this.getRightStyle().right3 : this.getRightStyle().right2 }>
{childrenArray.slice(1).map((child, i) => {
return React.cloneElement(child, {...this.getChildProps(child), key: i});
|
<mask>
<mask> var childrenArray = React.Children.toArray(this.props.children);
<mask> newChildren.push(React.cloneElement(childrenArray[0], this.getChildProps(childrenArray[0])));
<mask> newChildren.push(
<mask> <View key={keyIndex++} style={ this.notePresent() ? this.getRightStyle().right : this.squareThumbs() ? this.getRightStyle().right3 : this.getRightStyle().right2 }>
<mask> {childrenArray.slice(1).map((child) => {
<mask> return React.cloneElement(child, this.getChildProps(child));
<mask> })}
<mask> </View>
<mask> );
<mask> }
<mask> }
</s> fix issues arising from component keys </s> remove <View key={keyIndex++} style={{justifyContent: 'flex-start'}}>
</s> add <View key='cardItem' style={{justifyContent: 'flex-start'}}> </s> remove <View key={keyIndex++} style={{alignSelf: 'stretch', flex:1}}>
</s> add <View key='listItem' style={{alignSelf: 'stretch', flex:1}}>
</s> remove newChildren.push(<Input key={keyIndex++} {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
</s> add newChildren.push(<Input key='inp' {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>); </s> remove newChildren.push(<Input key={keyIndex++} {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
</s> add newChildren.push(<Input key='inp' {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>); </s> remove newChildren.push(React.cloneElement(iconElement[0], this.getIconProps(iconElement[0])));
newChildren.push(<Input key={keyIndex++} {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
newChildren.push(React.cloneElement(iconElement[1], this.getIconProps(iconElement[1])));
</s> add newChildren.push(React.cloneElement(
iconElement[0],
{
...this.getIconProps(iconElement[0]),
key: 'icon0'
}
));
newChildren.push(<Input key='inp' {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
newChildren.push(React.cloneElement(
iconElement[1],
{
...this.getIconProps(iconElement[1]),
key: 'icon1'
}
));
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/CardItem.js
|
<mask> import computeProps from '../../Utils/computeProps';
<mask> import Input from './Input';
<mask> import _ from 'lodash';
<mask>
<mask> var keyIndex = 0;
<mask>
<mask> export default class InputGroup extends NativeBaseComponent {
<mask>
<mask> getInitialStyle() {
<mask> return {
<mask> textInput: {
</s> fix issues arising from component keys </s> remove var keyIndex = 0;
</s> add </s> remove var keyIndex = 0;
</s> add </s> remove newChildren = React.Children.map(this.props.children, (child) => {
return React.cloneElement(child, this.getChildProps(child));
</s> add newChildren = React.Children.map(this.props.children, (child, i) => {
return React.cloneElement(child, {...this.getChildProps(child), key: i}); </s> remove newChildren.push(React.cloneElement(iconElement[0], this.getChildProps(iconElement[0])));
</s> add newChildren.push(React.cloneElement(iconElement[0], {...this.getChildProps(iconElement[0]), key: 'listItem1'}));
</s> remove key: keyIndex++
</s> add key: 'inpGroup'
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/InputGroup.js
|
|
key: 'inpGroup'
|
<mask> var addedProps = _.merge(this.getInitialStyle().textInput, type);
<mask>
<mask> var defaultProps = {
<mask> style: addedProps,
<mask> key: keyIndex++
<mask> }
<mask>
<mask> return computeProps(this.props, defaultProps);
<mask> }
<mask>
</s> fix issues arising from component keys </s> remove key: keyIndex++
</s> add key: 'icon' </s> remove style: this.getInitialStyle().listItem,
key: keyIndex++
</s> add style: this.getInitialStyle().listItem </s> remove style: this.getInitialStyle().listItem,
key: keyIndex++
</s> add style: this.getInitialStyle().listItem
</s> remove foregroundColor: this.getContextForegroundColor(),
key: keyIndex++
</s> add foregroundColor: this.getContextForegroundColor() </s> remove foregroundColor: this.getContextForegroundColor(),
key: keyIndex++
</s> add foregroundColor: this.getContextForegroundColor()
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/InputGroup.js
|
key: 'icon'
|
<mask> }
<mask>
<mask> var defaultProps = {
<mask> style: defaultStyle,
<mask> key: keyIndex++
<mask> }
<mask>
<mask> return computeProps(icon.props, defaultProps);
<mask> }
<mask>
</s> fix issues arising from component keys </s> remove key: keyIndex++
</s> add key: 'inpGroup' </s> remove foregroundColor: this.getContextForegroundColor(),
key: keyIndex++
</s> add foregroundColor: this.getContextForegroundColor() </s> remove foregroundColor: this.getContextForegroundColor(),
key: keyIndex++
</s> add foregroundColor: this.getContextForegroundColor() </s> remove style: this.getInitialStyle().listItem,
key: keyIndex++
</s> add style: this.getInitialStyle().listItem </s> remove style: this.getInitialStyle().listItem,
key: keyIndex++
</s> add style: this.getInitialStyle().listItem
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/InputGroup.js
|
newChildren.push(<Input key='inp' {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
|
<mask>
<mask> if(Array.isArray(this.props.children)) {
<mask>
<mask> if(this.props.iconRight) {
<mask> newChildren.push(<Input key={keyIndex++} {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
<mask> newChildren.push(React.cloneElement(iconElement[0],this.getIconProps(iconElement[0])));
<mask> }
<mask> else {
<mask> if (iconElement.length > 1) {
<mask> newChildren.push(React.cloneElement(iconElement[0], this.getIconProps(iconElement[0])));
</s> fix issues arising from component keys </s> remove newChildren.push(React.cloneElement(iconElement[0], this.getIconProps(iconElement[0])));
newChildren.push(<Input key={keyIndex++} {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
newChildren.push(React.cloneElement(iconElement[1], this.getIconProps(iconElement[1])));
</s> add newChildren.push(React.cloneElement(
iconElement[0],
{
...this.getIconProps(iconElement[0]),
key: 'icon0'
}
));
newChildren.push(<Input key='inp' {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
newChildren.push(React.cloneElement(
iconElement[1],
{
...this.getIconProps(iconElement[1]),
key: 'icon1'
}
)); </s> remove newChildren.push(<Input key={keyIndex++} {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
</s> add newChildren.push(<Input key='inp' {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>); </s> remove newChildren.push(<Input key={keyIndex++} {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
</s> add newChildren.push(<Input key='inp' {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>); </s> remove newChildren.push(React.cloneElement(iconElement[0], this.getChildProps(iconElement[0])));
newChildren.push(<View key={keyIndex++} style={{flexDirection: 'column', paddingLeft: 15, alignSelf: (this.squareThumbs()) ? 'flex-start' : 'center', flex: 1 }} >
{childrenArray.map((child) => {
return React.cloneElement(child, this.getChildProps(child));
</s> add newChildren.push(React.cloneElement(iconElement[0], {...this.getChildProps(iconElement[0]), key: 'listItem0'}));
newChildren.push(<View key='listItem1' style={{flexDirection: 'column', paddingLeft: 15, alignSelf: (this.squareThumbs()) ? 'flex-start' : 'center', flex: 1 }} >
{childrenArray.map((child, i) => {
return React.cloneElement(child, {...this.getChildProps(child), key: i});
</s> remove <View key={keyIndex++} style={ this.notePresent() ? this.getRightStyle().right : this.squareThumbs() ? this.getRightStyle().right3 : this.getRightStyle().right2 }>
{childrenArray.slice(1).map((child) => {
return React.cloneElement(child, this.getChildProps(child));
</s> add <View key='cardItem' style={ this.notePresent() ? this.getRightStyle().right : this.squareThumbs() ? this.getRightStyle().right3 : this.getRightStyle().right2 }>
{childrenArray.slice(1).map((child, i) => {
return React.cloneElement(child, {...this.getChildProps(child), key: i});
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/InputGroup.js
|
newChildren.push(React.cloneElement(
iconElement[0],
{
...this.getIconProps(iconElement[0]),
key: 'icon0'
}
));
newChildren.push(<Input key='inp' {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
newChildren.push(React.cloneElement(
iconElement[1],
{
...this.getIconProps(iconElement[1]),
key: 'icon1'
}
));
|
<mask> newChildren.push(React.cloneElement(iconElement[0],this.getIconProps(iconElement[0])));
<mask> }
<mask> else {
<mask> if (iconElement.length > 1) {
<mask> newChildren.push(React.cloneElement(iconElement[0], this.getIconProps(iconElement[0])));
<mask> newChildren.push(<Input key={keyIndex++} {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
<mask> newChildren.push(React.cloneElement(iconElement[1], this.getIconProps(iconElement[1])));
<mask> } else {
<mask> newChildren.push(React.cloneElement(iconElement[0], this.getIconProps(iconElement[0])));
<mask> newChildren.push(<Input key={keyIndex++} {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
<mask> }
<mask> }
</s> fix issues arising from component keys </s> remove newChildren.push(<Input key={keyIndex++} {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
</s> add newChildren.push(<Input key='inp' {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>); </s> remove newChildren.push(<Input key={keyIndex++} {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
</s> add newChildren.push(<Input key='inp' {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>); </s> remove newChildren.push(<Input key={keyIndex++} {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
</s> add newChildren.push(<Input key='inp' {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>); </s> remove <View key={keyIndex++} style={ this.notePresent() ? this.getRightStyle().right : this.squareThumbs() ? this.getRightStyle().right3 : this.getRightStyle().right2 }>
{childrenArray.slice(1).map((child) => {
return React.cloneElement(child, this.getChildProps(child));
</s> add <View key='cardItem' style={ this.notePresent() ? this.getRightStyle().right : this.squareThumbs() ? this.getRightStyle().right3 : this.getRightStyle().right2 }>
{childrenArray.slice(1).map((child, i) => {
return React.cloneElement(child, {...this.getChildProps(child), key: i}); </s> remove newChildren.push(React.cloneElement(iconElement[0], this.getChildProps(iconElement[0])));
newChildren.push(<View key={keyIndex++} style={{flexDirection: 'column', paddingLeft: 15, alignSelf: (this.squareThumbs()) ? 'flex-start' : 'center', flex: 1 }} >
{childrenArray.map((child) => {
return React.cloneElement(child, this.getChildProps(child));
</s> add newChildren.push(React.cloneElement(iconElement[0], {...this.getChildProps(iconElement[0]), key: 'listItem0'}));
newChildren.push(<View key='listItem1' style={{flexDirection: 'column', paddingLeft: 15, alignSelf: (this.squareThumbs()) ? 'flex-start' : 'center', flex: 1 }} >
{childrenArray.map((child, i) => {
return React.cloneElement(child, {...this.getChildProps(child), key: i});
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/InputGroup.js
|
newChildren.push(<Input key='inp' {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
|
<mask> newChildren.push(<Input key={keyIndex++} {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
<mask> newChildren.push(React.cloneElement(iconElement[1], this.getIconProps(iconElement[1])));
<mask> } else {
<mask> newChildren.push(React.cloneElement(iconElement[0], this.getIconProps(iconElement[0])));
<mask> newChildren.push(<Input key={keyIndex++} {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
<mask> }
<mask> }
<mask> }
<mask>
<mask> else {
</s> fix issues arising from component keys </s> remove newChildren.push(React.cloneElement(iconElement[0], this.getIconProps(iconElement[0])));
newChildren.push(<Input key={keyIndex++} {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
newChildren.push(React.cloneElement(iconElement[1], this.getIconProps(iconElement[1])));
</s> add newChildren.push(React.cloneElement(
iconElement[0],
{
...this.getIconProps(iconElement[0]),
key: 'icon0'
}
));
newChildren.push(<Input key='inp' {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
newChildren.push(React.cloneElement(
iconElement[1],
{
...this.getIconProps(iconElement[1]),
key: 'icon1'
}
)); </s> remove newChildren.push(<Input key={keyIndex++} {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
</s> add newChildren.push(<Input key='inp' {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>); </s> remove newChildren.push(<Input key={keyIndex++} {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
</s> add newChildren.push(<Input key='inp' {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>); </s> remove <View key={keyIndex++} style={ this.notePresent() ? this.getRightStyle().right : this.squareThumbs() ? this.getRightStyle().right3 : this.getRightStyle().right2 }>
{childrenArray.slice(1).map((child) => {
return React.cloneElement(child, this.getChildProps(child));
</s> add <View key='cardItem' style={ this.notePresent() ? this.getRightStyle().right : this.squareThumbs() ? this.getRightStyle().right3 : this.getRightStyle().right2 }>
{childrenArray.slice(1).map((child, i) => {
return React.cloneElement(child, {...this.getChildProps(child), key: i}); </s> remove newChildren.push(React.cloneElement(iconElement[0], this.getChildProps(iconElement[0])));
newChildren.push(<View key={keyIndex++} style={{flexDirection: 'column', paddingLeft: 15, alignSelf: (this.squareThumbs()) ? 'flex-start' : 'center', flex: 1 }} >
{childrenArray.map((child) => {
return React.cloneElement(child, this.getChildProps(child));
</s> add newChildren.push(React.cloneElement(iconElement[0], {...this.getChildProps(iconElement[0]), key: 'listItem0'}));
newChildren.push(<View key='listItem1' style={{flexDirection: 'column', paddingLeft: 15, alignSelf: (this.squareThumbs()) ? 'flex-start' : 'center', flex: 1 }} >
{childrenArray.map((child, i) => {
return React.cloneElement(child, {...this.getChildProps(child), key: i});
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/InputGroup.js
|
newChildren.push(<Input key='inp' {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
|
<mask> }
<mask> }
<mask>
<mask> else {
<mask> newChildren.push(<Input key={keyIndex++} {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
<mask> }
<mask>
<mask> return newChildren;
<mask> }
<mask>
</s> fix issues arising from component keys </s> remove newChildren.push(<Input key={keyIndex++} {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
</s> add newChildren.push(<Input key='inp' {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>); </s> remove newChildren.push(React.cloneElement(iconElement[0], this.getIconProps(iconElement[0])));
newChildren.push(<Input key={keyIndex++} {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
newChildren.push(React.cloneElement(iconElement[1], this.getIconProps(iconElement[1])));
</s> add newChildren.push(React.cloneElement(
iconElement[0],
{
...this.getIconProps(iconElement[0]),
key: 'icon0'
}
));
newChildren.push(<Input key='inp' {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
newChildren.push(React.cloneElement(
iconElement[1],
{
...this.getIconProps(iconElement[1]),
key: 'icon1'
}
)); </s> remove newChildren.push(<Input key={keyIndex++} {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>);
</s> add newChildren.push(<Input key='inp' {...inputProps} style={{height: this.props.toolbar ? 30 : undefined, fontSize: this.props.toolbar ? 15 : undefined}}/>); </s> remove <View key={keyIndex++} style={ this.notePresent() ? this.getRightStyle().right : this.squareThumbs() ? this.getRightStyle().right3 : this.getRightStyle().right2 }>
{childrenArray.slice(1).map((child) => {
return React.cloneElement(child, this.getChildProps(child));
</s> add <View key='cardItem' style={ this.notePresent() ? this.getRightStyle().right : this.squareThumbs() ? this.getRightStyle().right3 : this.getRightStyle().right2 }>
{childrenArray.slice(1).map((child, i) => {
return React.cloneElement(child, {...this.getChildProps(child), key: i}); </s> remove newChildren.push(React.cloneElement(iconElement[0], this.getChildProps(iconElement[0])));
newChildren.push(<View key={keyIndex++} style={{flexDirection: 'column', paddingLeft: 15, alignSelf: (this.squareThumbs()) ? 'flex-start' : 'center', flex: 1 }} >
{childrenArray.map((child) => {
return React.cloneElement(child, this.getChildProps(child));
</s> add newChildren.push(React.cloneElement(iconElement[0], {...this.getChildProps(iconElement[0]), key: 'listItem0'}));
newChildren.push(<View key='listItem1' style={{flexDirection: 'column', paddingLeft: 15, alignSelf: (this.squareThumbs()) ? 'flex-start' : 'center', flex: 1 }} >
{childrenArray.map((child, i) => {
return React.cloneElement(child, {...this.getChildProps(child), key: i});
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/InputGroup.js
|
<mask> import Thumbnail from './Thumbnail';
<mask> import InputGroup from './InputGroup';
<mask> import _ from 'lodash';
<mask>
<mask> var keyIndex = 0;
<mask>
<mask> export default class ListItemNB extends NativeBaseComponent {
<mask>
<mask> getInitialStyle() {
<mask>
<mask> return {
</s> fix issues arising from component keys </s> remove var keyIndex = 0;
</s> add </s> remove var keyIndex = 0;
</s> add </s> remove newChildren = React.Children.map(this.props.children, (child) => {
return React.cloneElement(child, this.getChildProps(child));
</s> add newChildren = React.Children.map(this.props.children, (child, i) => {
return React.cloneElement(child, {...this.getChildProps(child), key: i}); </s> remove newChildren.push(React.cloneElement(iconElement[0], this.getChildProps(iconElement[0])));
</s> add newChildren.push(React.cloneElement(iconElement[0], {...this.getChildProps(iconElement[0]), key: 'listItem1'}));
</s> remove key: keyIndex++
</s> add key: 'inpGroup'
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/ListItem.js
|
|
style: this.getInitialStyle().fullImage
|
<mask>
<mask> if(child.type == Image && !Array.isArray(this.props.children)) {
<mask> defaultProps = {
<mask> resizeMode: 'stretch',
<mask> style: this.getInitialStyle().fullImage,
<mask> key: keyIndex++
<mask> }
<mask> }
<mask> else if(child.type == Button) {
<mask> defaultProps = {
<mask> small: true,
</s> fix issues arising from component keys </s> remove style: this.getInitialStyle().fullImage,
key: keyIndex++
</s> add style: this.getInitialStyle().fullImage </s> remove style: this.getInitialStyle().itemButton,
key: keyIndex++
</s> add style: this.getInitialStyle().itemButton
</s> remove style: this.getInitialStyle().itemButton,
key: keyIndex++
</s> add style: this.getInitialStyle().itemButton </s> remove style: this.getInitialStyle().thumbnail,
key: keyIndex++
</s> add style: this.getInitialStyle().thumbnail </s> remove style: this.getInitialStyle().fullImage,
key: keyIndex++
</s> add style: this.getInitialStyle().fullImage
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/ListItem.js
|
style: this.getInitialStyle().itemButton
|
<mask> }
<mask> else if(child.type == Button) {
<mask> defaultProps = {
<mask> small: true,
<mask> style: this.getInitialStyle().itemButton,
<mask> key: keyIndex++
<mask> }
<mask> }
<mask> else if(child.type == InputGroup) {
<mask>
<mask> defaultProps = {
</s> fix issues arising from component keys </s> remove style: this.getInitialStyle().itemButton,
key: keyIndex++
</s> add style: this.getInitialStyle().itemButton </s> remove style: this.getInitialStyle().fullImage,
key: keyIndex++
</s> add style: this.getInitialStyle().fullImage
</s> remove style: this.getInitialStyle().fullImage,
key: keyIndex++
</s> add style: this.getInitialStyle().fullImage </s> remove style: this.getInitialStyle().itemIcon,
key: keyIndex++
</s> add style: this.getInitialStyle().itemIcon </s> remove style: this.getInitialStyle().itemIcon,
key: keyIndex++
</s> add style: this.getInitialStyle().itemIcon
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/ListItem.js
|
foregroundColor: this.getContextForegroundColor()
|
<mask> defaultProps = {
<mask> style: {
<mask> borderColor: this.getTheme().listBorderColor
<mask> },
<mask> foregroundColor: this.getContextForegroundColor(),
<mask> key: keyIndex++
<mask> }
<mask> }
<mask> else if(child.type == Text) {
<mask> if (this.props.itemDivider) {
<mask> defaultProps = {
</s> fix issues arising from component keys </s> remove style: this.getInitialStyle().dividerItemText,
key: keyIndex++
</s> add style: this.getInitialStyle().dividerItemText
</s> remove style: this.getInitialStyle().thumbnail,
key: keyIndex++
</s> add style: this.getInitialStyle().thumbnail
</s> remove style: this.getInitialStyle().fullImage,
key: keyIndex++
</s> add style: this.getInitialStyle().fullImage </s> remove style: this.getInitialStyle().itemButton,
key: keyIndex++
</s> add style: this.getInitialStyle().itemButton </s> remove foregroundColor: this.getContextForegroundColor(),
key: keyIndex++
</s> add foregroundColor: this.getContextForegroundColor()
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/ListItem.js
|
style: this.getInitialStyle().dividerItemText
|
<mask> }
<mask> else if(child.type == Text) {
<mask> if (this.props.itemDivider) {
<mask> defaultProps = {
<mask> style: this.getInitialStyle().dividerItemText,
<mask> key: keyIndex++
<mask> }
<mask> } else {
<mask> if(child.props.note && this.thumbnailPresent()) {
<mask> defaultProps = {
<mask> style: this.getInitialStyle().itemSubNote,
</s> fix issues arising from component keys </s> remove style: this.getInitialStyle().dividerItemText,
key: keyIndex++
</s> add style: this.getInitialStyle().dividerItemText </s> remove style: this.getInitialStyle().itemSubNote,
key: keyIndex++
</s> add style: this.getInitialStyle().itemSubNote
</s> remove style: this.getInitialStyle().itemSubNote,
key: keyIndex++
</s> add style: this.getInitialStyle().itemSubNote </s> remove foregroundColor: this.getContextForegroundColor(),
key: keyIndex++
</s> add foregroundColor: this.getContextForegroundColor()
</s> remove style: this.getInitialStyle().itemButton,
key: keyIndex++
</s> add style: this.getInitialStyle().itemButton
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/ListItem.js
|
style: this.getInitialStyle().itemSubNote
|
<mask> }
<mask> } else {
<mask> if(child.props.note && this.thumbnailPresent()) {
<mask> defaultProps = {
<mask> style: this.getInitialStyle().itemSubNote,
<mask> key: keyIndex++
<mask> }
<mask> }
<mask> else if(child.props.note) {
<mask> defaultProps = {
<mask> style: this.getInitialStyle().itemNote,
</s> fix issues arising from component keys </s> remove style: this.getInitialStyle().itemSubNote,
key: keyIndex++
</s> add style: this.getInitialStyle().itemSubNote </s> remove style: this.getInitialStyle().dividerItemText,
key: keyIndex++
</s> add style: this.getInitialStyle().dividerItemText
</s> remove style: this.getInitialStyle().itemNote,
key: keyIndex++
</s> add style: this.getInitialStyle().itemNote </s> remove style: this.getInitialStyle().itemNote,
key: keyIndex++
</s> add style: this.getInitialStyle().itemNote </s> remove style: this.getInitialStyle().dividerItemText,
key: keyIndex++
</s> add style: this.getInitialStyle().dividerItemText
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/ListItem.js
|
style: this.getInitialStyle().itemNote
|
<mask> }
<mask> }
<mask> else if(child.props.note) {
<mask> defaultProps = {
<mask> style: this.getInitialStyle().itemNote,
<mask> key: keyIndex++
<mask> }
<mask> }
<mask> else {
<mask> defaultProps = {
<mask> style: this.getInitialStyle().itemText,
</s> fix issues arising from component keys
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/ListItem.js
|
style: this.getInitialStyle().itemText
|
<mask> }
<mask> }
<mask> else {
<mask> defaultProps = {
<mask> style: this.getInitialStyle().itemText,
<mask> key: keyIndex++
<mask> }
<mask> }
<mask>
<mask> }
<mask> }
</s> fix issues arising from component keys </s> remove style: this.getInitialStyle().itemText,
key: keyIndex++
</s> add style: this.getInitialStyle().itemText </s> remove style: this.getInitialStyle().itemNote,
key: keyIndex++
</s> add style: this.getInitialStyle().itemNote </s> remove style: this.getInitialStyle().itemNote,
key: keyIndex++
</s> add style: this.getInitialStyle().itemNote </s> remove style: this.getInitialStyle().thumbnail,
key: keyIndex++
</s> add style: this.getInitialStyle().thumbnail
</s> remove style: this.getInitialStyle().itemSubNote,
key: keyIndex++
</s> add style: this.getInitialStyle().itemSubNote
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/ListItem.js
|
style: this.getInitialStyle().itemIcon
|
<mask> }
<mask> }
<mask> else if(child.type == Icon) {
<mask> defaultProps = {
<mask> style: this.getInitialStyle().itemIcon,
<mask> key: keyIndex++
<mask> }
<mask> }
<mask> else if(child.type == Thumbnail) {
<mask> defaultProps = {
<mask> style: this.getInitialStyle().thumbnail,
</s> fix issues arising from component keys
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/ListItem.js
|
style: this.getInitialStyle().thumbnail
|
<mask> }
<mask> }
<mask> else if(child.type == Thumbnail) {
<mask> defaultProps = {
<mask> style: this.getInitialStyle().thumbnail,
<mask> key: keyIndex++
<mask> }
<mask> }
<mask> else {
<mask> defaultProps = {
<mask> foregroundColor: this.getContextForegroundColor(),
</s> fix issues arising from component keys </s> remove style: this.getInitialStyle().itemIcon,
key: keyIndex++
</s> add style: this.getInitialStyle().itemIcon </s> remove style: this.getInitialStyle().itemIcon,
key: keyIndex++
</s> add style: this.getInitialStyle().itemIcon </s> remove style: this.getInitialStyle().thumbnail,
key: keyIndex++
</s> add style: this.getInitialStyle().thumbnail </s> remove style: this.getInitialStyle().fullImage,
key: keyIndex++
</s> add style: this.getInitialStyle().fullImage </s> remove foregroundColor: this.getContextForegroundColor(),
key: keyIndex++
</s> add foregroundColor: this.getContextForegroundColor()
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/ListItem.js
|
foregroundColor: this.getContextForegroundColor()
|
<mask> }
<mask> }
<mask> else {
<mask> defaultProps = {
<mask> foregroundColor: this.getContextForegroundColor(),
<mask> key: keyIndex++
<mask> }
<mask> }
<mask>
<mask> return computeProps(child.props, defaultProps);
<mask> }
</s> fix issues arising from component keys
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/ListItem.js
|
style: this.getInitialStyle().listItemDivider
|
<mask> var defaultProps = {};
<mask>
<mask> if(this.props.itemDivider)
<mask> defaultProps = {
<mask> style: this.getInitialStyle().listItemDivider,
<mask> key: keyIndex++
<mask> };
<mask>
<mask> else
<mask> defaultProps = {
<mask> style: this.getInitialStyle().listItem,
</s> fix issues arising from component keys </s> remove style: this.getInitialStyle().listItemDivider,
key: keyIndex++
</s> add style: this.getInitialStyle().listItemDivider </s> remove style: this.getInitialStyle().listItem,
key: keyIndex++
</s> add style: this.getInitialStyle().listItem
</s> remove style: this.getInitialStyle().listItem,
key: keyIndex++
</s> add style: this.getInitialStyle().listItem </s> remove style: this.getInitialStyle().fullImage,
key: keyIndex++
</s> add style: this.getInitialStyle().fullImage </s> remove newChildren = React.Children.map(this.props.children, (child) => {
return React.cloneElement(child, this.getChildProps(child));
</s> add newChildren = React.Children.map(this.props.children, (child, i) => {
return React.cloneElement(child, {...this.getChildProps(child), key: i});
|
[
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] |
https://github.com/GeekyAnts/NativeBase/commit/995d5398aaeb4a1d39267a923c3393c74c65a1e3
|
Components/Widgets/ListItem.js
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.