Skip to content

Commit 45f069e

Browse files
authored
Merge pull request #4688 from GeekyAnts/fix/typing-radio-checkbox
Fix/typing radio checkbox
2 parents 846b18b + 0d99fcb commit 45f069e

File tree

3 files changed

+51
-10
lines changed

3 files changed

+51
-10
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"prettier --write"
3737
]
3838
},
39-
"version": "3.3.8-alpha.1",
39+
"version": "3.3.8-alpha.3",
4040
"license": "MIT",
4141
"private": false,
4242
"main": "lib/commonjs/index",

src/components/primitives/Checkbox/types.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,43 +78,43 @@ export interface ICheckboxProps extends IBoxProps<ICheckboxProps> {
7878
/**
7979
* Passed props wilICheckboxGroupPropsl be applied on disabled state.
8080
*/
81-
_disabled?: Omit<ICheckboxProps, '_disabled'>;
81+
_disabled?: Omit<Partial<ICheckboxProps>, '_disabled'>;
8282
/**
8383
* Passed props will be applied on checked state.
8484
*/
85-
_checked?: Omit<ICheckboxProps, '_checked'>;
85+
_checked?: Omit<Partial<ICheckboxProps>, '_checked'>;
8686
/**
8787
* Passed props will be applied on unchecked state.
8888
*/
89-
_unchecked?: Omit<ICheckboxProps, '_unchecked'>;
89+
_unchecked?: Omit<Partial<ICheckboxProps>, '_unchecked'>;
9090
/**
9191
* Passed props will be applied on focus state.
9292
*/
93-
_focus?: Omit<ICheckboxProps, '_focus'>;
93+
_focus?: Omit<Partial<ICheckboxProps>, '_focus'>;
9494
/**
9595
* Passed props will be applied on hover state.
9696
*/
97-
_hover?: Omit<ICheckboxProps, '_hover'>;
97+
_hover?: Omit<Partial<ICheckboxProps>, '_hover'>;
9898
/**
9999
* Passed props will be applied on invalid state.
100100
*/
101-
_invalid?: Omit<ICheckboxProps, '_invalid'>;
101+
_invalid?: Omit<Partial<ICheckboxProps>, '_invalid'>;
102102
/**
103103
* Passed props will be applied on pressed state on native.
104104
*/
105-
_pressed?: Omit<ICheckboxProps, '_pressed'>;
105+
_pressed?: Omit<Partial<ICheckboxProps>, '_pressed'>;
106106
/**
107107
* Passed props will be applied on readonly state.
108108
*/
109-
_readOnly?: Omit<ICheckboxProps, '_readOnly'>;
109+
_readOnly?: Omit<Partial<ICheckboxProps>, '_readOnly'>;
110110
/**
111111
* Icon related props can be passed in _icon.
112112
*/
113113
_icon?: IIconProps;
114114
/**
115115
* You can style interaction box around the checkbox using this.
116116
*/
117-
_interactionBox?: Omit<ICheckboxProps, '_interactionBox'>;
117+
_interactionBox?: Omit<Partial<ICheckboxProps>, '_interactionBox'>;
118118
/**
119119
* Function called when the state of the checkbox changes.
120120
*/

src/components/primitives/Radio/types.tsx

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,47 @@ export interface IRadioProps extends IBoxProps<IRadioProps> {
5757
* Ref to be passed to Icon's wrapper Box
5858
*/
5959
wrapperRef?: any;
60+
61+
/**
62+
* Passed props wilICheckboxGroupPropsl be applied on disabled state.
63+
*/
64+
_disabled?: Omit<Partial<IRadioProps>, '_disabled'>;
65+
/**
66+
* Passed props will be applied on checked state.
67+
*/
68+
_checked?: Omit<Partial<IRadioProps>, '_checked'>;
69+
/**
70+
* Passed props will be applied on unchecked state.
71+
*/
72+
_unchecked?: Omit<Partial<IRadioProps>, '_unchecked'>;
73+
/**
74+
* Passed props will be applied on focus state.
75+
*/
76+
_focus?: Omit<Partial<IRadioProps>, '_focus'>;
77+
/**
78+
* Passed props will be applied on hover state.
79+
*/
80+
_hover?: Omit<Partial<IRadioProps>, '_hover'>;
81+
/**
82+
* Passed props will be applied on invalid state.
83+
*/
84+
_invalid?: Omit<Partial<IRadioProps>, '_invalid'>;
85+
/**
86+
* Passed props will be applied on pressed state on native.
87+
*/
88+
_pressed?: Omit<Partial<IRadioProps>, '_pressed'>;
89+
/**
90+
* Icon related props can be passed in _icon.
91+
*/
92+
_icon?: Partial<IRadioProps>;
93+
/**
94+
* Passed props will be applied on readonly state.
95+
*/
96+
_readOnly?: Omit<Partial<IRadioProps>, '_readOnly'>;
97+
/**
98+
* You can style interaction box around the checkbox using this.
99+
*/
100+
_interactionBox?: Omit<Partial<IRadioProps>, '_interactionBox'>;
60101
}
61102
export interface IRadioGroupProps extends IBoxProps<IRadioGroupProps> {
62103
/**

0 commit comments

Comments
 (0)