Skip to content

Commit 7e441d6

Browse files
committed
fix: modal typing
1 parent 0dd89bf commit 7e441d6

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/components/composites/Modal/types.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import type { InterfaceBoxProps } from '../../primitives/Box';
22
import type { IIconButtonProps } from '../../composites/IconButton';
33
import type { MutableRefObject } from 'react';
4-
5-
import type { CustomProps, ResponsiveValue } from '../../../components/types';
6-
import type { ISizes } from '../../../theme/base/sizes';
4+
import type { CustomProps } from '../../../components/types';
75
import type { IScrollViewProps } from '../../basic/ScrollView';
86
import type { IFadeProps, ISlideProps } from '../Transitions';
9-
7+
import type { ThemeComponentSizeType } from '../../../components/types/utils';
108
export interface InterfaceModalProps extends InterfaceBoxProps<IModalProps> {
119
/**
1210
* If true, the modal will open. Useful for controllable state behaviour
@@ -23,7 +21,7 @@ export interface InterfaceModalProps extends InterfaceBoxProps<IModalProps> {
2321
/**
2422
* The size of the modal
2523
*/
26-
size?: ResponsiveValue<ISizes | (string & {}) | number>;
24+
size?: ThemeComponentSizeType<'Modal'>;
2725
/**
2826
* The ref of element to receive focus when the modal opens.
2927
*/
@@ -69,15 +67,15 @@ export interface InterfaceModalProps extends InterfaceBoxProps<IModalProps> {
6967
/**
7068
* Props applied on Overlay Animation.
7169
*/
72-
_backdropFade?: IFadeProps;
70+
_backdropFade?: Partial<IFadeProps>;
7371
/**
7472
* Props applied on Child Fade Animation.
7573
*/
76-
_fade?: IFadeProps;
74+
_fade?: Partial<IFadeProps>;
7775
/**
7876
* Props applied on Child Slide Animation.
7977
*/
80-
_slide?: ISlideProps;
78+
_slide?: Partial<ISlideProps>;
8179
}
8280

8381
export type IModalComponentType = ((

0 commit comments

Comments
 (0)