Skip to content

Commit 35ee103

Browse files
authored
Merge pull request #5517 from GeekyAnts/canary-patch
Canary patch
2 parents 7fb08da + 88c44fb commit 35ee103

File tree

9 files changed

+26
-14
lines changed

9 files changed

+26
-14
lines changed

example/storybook/stories/components/primitives/Flex/basic.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export function Example() {
1313
return (
1414
<Box flex="1" safeAreaTop>
1515
<ScrollView>
16-
<VStack space={2.5} w="100%" px="3">
16+
<VStack alignItems="start" space={2.5} w="100%" px="3">
1717
{/* flexDirection -> row */}
1818
<Heading size="md">row</Heading>
1919
<Flex direction="row" mb="2.5" mt="1.5">

example/storybook/stories/components/primitives/Icon/CreateIcon.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import React from 'react';
22
import { createIcon } from 'native-base';
3-
import { Circle } from 'react-native-svg';
3+
import { Circle as CircleSvg } from 'react-native-svg';
44
export const Example = () => {
55
const CustomIcon = createIcon({
66
viewBox: '0 0 36 36',
77
// d: 'M 100, 100 m -75, 0 a 75,75 0 1,0 150,0 a 75,75 0 1,0 -150,0',
88
path: [
9-
<Circle cx="18" cy="18" r="17.5" fill="#06B6D4" stroke="#0E7490" />,
10-
<Circle cx="18" cy="18" r="13.5" fill="white" stroke="#0E7490" />,
11-
<Circle cx="18" cy="18" r="9.5" fill="#06B6D4" stroke="#0E7490" />,
12-
<Circle cx="18" cy="18" r="5.5" fill="white" stroke="#0E7490" />,
9+
<CircleSvg cx="18" cy="18" r="17.5" fill="#06B6D4" stroke="#0E7490" />,
10+
<CircleSvg cx="18" cy="18" r="13.5" fill="white" stroke="#0E7490" />,
11+
<CircleSvg cx="18" cy="18" r="9.5" fill="#06B6D4" stroke="#0E7490" />,
12+
<CircleSvg cx="18" cy="18" r="5.5" fill="white" stroke="#0E7490" />,
1313
],
1414
});
1515
return <CustomIcon size={12} />;

example/storybook/stories/hooks/useContrastText/Basic.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from 'react';
22
import { Button, Center, VStack, useContrastText } from 'native-base';
33
export const Example = () => {
4-
const bgDark = 'gray.900';
5-
const bgLight = 'gray.50';
4+
const bgDark = 'coolGray.900';
5+
const bgLight = 'coolGray.100';
66
const colorContrastDark = useContrastText(bgDark);
77
const colorContrastLight = useContrastText(bgLight);
88
return (

example/storybook/stories/theme/Custom/CustomizingVariant.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ export const Example = () => {
1515
rounded: ({ colorScheme }: any) => {
1616
return {
1717
bg: `${colorScheme}.500`,
18+
_hover: { bg: `${colorScheme}.600` },
19+
_pressed: { bg: `${colorScheme}.700` },
20+
_text: { color: `${colorScheme}.50` },
1821
rounded: 'full',
1922
};
2023
},

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"prettier --write"
3737
]
3838
},
39-
"version": "3.4.19",
39+
"version": "3.4.20",
4040
"license": "MIT",
4141
"private": false,
4242
"main": "lib/commonjs/index",

src/components/composites/AlertDialog/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export interface InterfaceAlertDialogProps
3838
*/
3939
finalFocusRef?: React.RefObject<any> | any;
4040
/**
41-
* If true and the keyboard is opened, the AlertDialog will move up equvivalent to the keyboard height.
41+
* If true and the keyboard is opened, the AlertDialog will move up equivalent to the keyboard height.
4242
* @default false
4343
*/
4444
avoidKeyboard?: boolean;

src/components/composites/Modal/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export interface InterfaceModalProps extends InterfaceBoxProps<IModalProps> {
3232
*/
3333
finalFocusRef?: React.RefObject<any>;
3434
/**
35-
* If true and the keyboard is opened, the modal will move up equvivalent to the keyboard height.
35+
* If true and the keyboard is opened, the modal will move up equivalent to the keyboard height.
3636
* @default false
3737
*/
3838
avoidKeyboard?: boolean;

src/components/composites/Toast/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export interface InterfaceToastProps extends InterfaceBoxProps<IToastProps> {
5757
*/
5858
accessibilityLiveRegion?: 'none' | 'polite' | 'assertive';
5959
/**
60-
* If true and the keyboard is opened, the Toast will move up equvivalent to the keyboard height.
60+
* If true and the keyboard is opened, the Toast will move up equivalent to the keyboard height.
6161
* @default false
6262
*/
6363
avoidKeyboard?: boolean;

src/core/color-mode/hooks.tsx

+11-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,17 @@ export const useAppState = () => {
3232
() => ({
3333
getCurrentValue: () => AppState.currentState,
3434
subscribe: (callback: () => void) => {
35-
AppState.addEventListener('change', callback);
36-
return () => AppState.removeEventListener('change', callback);
35+
const subsription = AppState.addEventListener('change', callback);
36+
return () => {
37+
if (AppState.removeEventListener) {
38+
// React Native < 0.65
39+
AppState.removeEventListener('change', callback);
40+
} else {
41+
// React Native >= 0.65
42+
// @ts-ignore:next-line ignoring ts error as devDependency contains "@types/react-native" < 0.65
43+
subsription.remove();
44+
}
45+
};
3746
},
3847
}),
3948
[]

0 commit comments

Comments
 (0)