Skip to content

Commit 2c767d2

Browse files
committed
fix: input platform types
1 parent 23baa80 commit 2c767d2

File tree

6 files changed

+15
-9
lines changed

6 files changed

+15
-9
lines changed

example/storybook/stories/components/composites/Alert/knobEnabled.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { Alert, Box, CloseIcon, IconButton } from 'native-base';
2+
import { Alert, Box, CloseIcon, IconButton, Text } from 'native-base';
33
import { select } from '@storybook/addon-knobs';
44

55
export const Example = () => {
@@ -21,8 +21,8 @@ export const Example = () => {
2121
actionProps={{ alignSelf: 'center' }}
2222
>
2323
<Alert.Icon />
24-
<Alert.Title>Error Alert</Alert.Title>
25-
<Alert.Description>Description </Alert.Description>
24+
<Text>Error Alert</Text>
25+
<Text>Description </Text>
2626
</Alert>
2727
</Box>
2828
);

example/storybook/stories/components/composites/AlertDialog/Transition.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export const Example = () => {
1515
leastDestructiveRef={cancelRef}
1616
onClose={onClose}
1717
isOpen={isOpen}
18-
isCentered
1918
>
2019
<AlertDialog.Content>
2120
<AlertDialog.CloseButton />

src/components/composites/AlertDialog/types.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { IBoxProps } from '../../primitives/Box';
1+
import type { IBoxProps, InterfaceBoxProps } from '../../primitives/Box';
22
import type { IIconButtonProps } from '../IconButton';
33
import type { MutableRefObject } from 'react';
44
import type { IFadeProps, ISlideProps } from '../Transitions';
@@ -7,7 +7,8 @@ import type {
77
ThemeComponentSizeType,
88
} from '../../../components/types/utils';
99

10-
export interface InterfaceAlertDialogProps extends IBoxProps {
10+
export interface InterfaceAlertDialogProps
11+
extends InterfaceBoxProps<IAlertDialogProps> {
1112
/**
1213
* If true, the AlertDialog will open. Useful for controllable state behaviour
1314
*/

src/components/primitives/Icon/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import type { CustomProps, ThemeComponentSizeType } from '../../types/utils';
99
export interface InterfaceIconProps
1010
extends Omit<
1111
SvgProps,
12-
'opacity' | 'fill' | 'stroke' | 'height' | 'width' | 'transform' | 'color'
12+
'opacity' | 'stroke' | 'height' | 'width' | 'transform' | 'color'
1313
>,
1414
StyledProps,
1515
PlatformProps<IIconProps> {

src/components/primitives/Input/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import type { CustomProps } from '../../types';
1212
import type { IStackProps } from '../Stack/Stack';
1313

1414
export interface InterfaceInputProps
15-
extends PlatformProps<any>,
15+
extends PlatformProps<IInputProps>,
1616
Omit<TextInputProps, 'textAlign'>,
1717
StyledProps {
1818
/**

src/components/primitives/TextArea/index.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ import { usePropsResolution } from '../../../hooks/useThemeProps';
55
import { useHasResponsiveProps } from '../../../hooks/useHasResponsiveProps';
66
import { useHover } from '@react-native-aria/interactions';
77
import { mergeRefs } from '../../../utils';
8-
export interface ITextAreaProps extends InterfaceInputProps {
8+
import type { PlatformProps } from '../../../components/types';
9+
export interface ITextAreaProps
10+
extends Omit<
11+
InterfaceInputProps,
12+
'_web' | '_android' | '_ios' | '_light' | '_dark'
13+
>,
14+
PlatformProps<ITextAreaProps> {
915
/**
1016
* Maps to react-native TextInput's numberOfLines.
1117
*/

0 commit comments

Comments
 (0)