Skip to content

Commit 6fa9993

Browse files
committed
fix: icon-button typing
1 parent 782b61a commit 6fa9993

File tree

1 file changed

+7
-8
lines changed
  • src/components/composites/IconButton

1 file changed

+7
-8
lines changed

src/components/composites/IconButton/types.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import type { InterfacePressableProps } from '../../primitives/Pressable/types';
22
import type { IIconProps } from '../../primitives/Icon';
3-
import type { CustomProps, ResponsiveValue, VariantType } from '../../types';
4-
import type { ISizes } from '../../../theme/base/sizes';
5-
3+
import type { CustomProps, VariantType } from '../../types';
4+
import type { ThemeComponentSizeType } from '../../../components/types/utils';
65
export interface InterfaceIconButtonProps
76
extends Omit<InterfacePressableProps, 'children' | 'color'>,
87
Omit<
@@ -35,7 +34,7 @@ export interface InterfaceIconButtonProps
3534
/**
3635
* The size of the button.
3736
*/
38-
size?: ResponsiveValue<ISizes | (string & {}) | number>;
37+
size?: ThemeComponentSizeType<'IconButton'>;
3938
/**
4039
* If true, the button will be disabled.
4140
*/
@@ -47,19 +46,19 @@ export interface InterfaceIconButtonProps
4746
/**
4847
* Props to be passed to the icon used inside of IconButton.
4948
*/
50-
_icon?: IIconProps;
49+
_icon?: Partial<IIconProps>;
5150
/**
5251
*
5352
*/
54-
_hover?: IIconButtonProps;
53+
_hover?: Omit<Partial<IIconButtonProps>, '_hover'>;
5554
/**
5655
*
5756
*/
58-
_pressed?: IIconButtonProps;
57+
_pressed?: Omit<Partial<IIconButtonProps>, '_pressed'>;
5958
/**
6059
*
6160
*/
62-
_focus?: IIconButtonProps;
61+
_focus?: Omit<Partial<IIconButtonProps>, '_focus'>;
6362
}
6463

6564
export type IIconButtonProps = InterfaceIconButtonProps & CustomProps<'Icon'>;

0 commit comments

Comments
 (0)