Skip to content

Commit c84e384

Browse files
committed
fix: adding Partial to pseudo props
1 parent 50085c7 commit c84e384

File tree

9 files changed

+24
-24
lines changed

9 files changed

+24
-24
lines changed

src/components/primitives/Box/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export interface InterfaceBoxProps<T = null>
3434
/**
3535
* For providing props to Text inside Box
3636
*/
37-
_text?: ITextProps;
37+
_text?: Partial<ITextProps>;
3838
bg?: ResponsiveValue<ColorType | (string & {}) | ILinearGradientProps>;
3939
background?: ResponsiveValue<
4040
ColorType | (string & {}) | ILinearGradientProps

src/components/primitives/Button/types.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,27 +104,27 @@ export interface InterfaceButtonProps
104104
/**
105105
* Props to be passed to the button when isLoading is true.
106106
*/
107-
_loading?: Omit<IButtonProps, '_loading'>;
107+
_loading?: Omit<Partial<IButtonProps>, '_loading'>;
108108
/**
109109
* Props to be passed to the button when button is disabled.
110110
*/
111-
_disabled?: Omit<IButtonProps, '_disable'>;
111+
_disabled?: Omit<Partial<IButtonProps>, '_disable'>;
112112
/**
113113
* Props to be passed to the spinner when isLoading is true.
114114
*/
115-
_spinner?: ISpinnerProps;
115+
_spinner?: Partial<ISpinnerProps>;
116116
/**
117117
* Props to be passed to the button when button is hovered.
118118
*/
119-
_hover?: Omit<IButtonProps, '_hover'>;
119+
_hover?: Omit<Partial<IButtonProps>, '_hover'>;
120120
/**
121121
* Props to be passed to the button when button is pressed.
122122
*/
123-
_pressed?: Omit<IButtonProps, '_pressed'>;
123+
_pressed?: Omit<Partial<IButtonProps>, '_pressed'>;
124124
/**
125125
* Props to be passed to the button when button is focused.
126126
*/
127-
_focus?: Omit<IButtonProps, '_focus'>;
127+
_focus?: Omit<Partial<IButtonProps>, '_focus'>;
128128
/**
129129
* The right icon element to use in the button.
130130
*/

src/components/primitives/Checkbox/types.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export interface InterfaceCheckbox extends InterfaceBoxProps<ICheckboxProps> {
123123
/**
124124
* Props to be passed to the Stack used inside.
125125
*/
126-
_stack?: IStackProps;
126+
_stack?: Partial<IStackProps>;
127127
/**
128128
* Function called when the state of the checkbox changes.
129129
*/
@@ -166,7 +166,7 @@ export interface ICheckboxGroupProps
166166
/**
167167
* Pass props will be passed to each checkbox.
168168
*/
169-
_checkbox?: ICheckboxProps;
169+
_checkbox?: Partial<ICheckboxProps>;
170170
}
171171
export interface ICheckboxContext extends IFormControlContext {
172172
colorScheme?: string;

src/components/primitives/Image/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export interface InterfaceImageProps
3636
/**
3737
* Text styling for alt.
3838
*/
39-
_alt?: ITextProps;
39+
_alt?: Partial<ITextProps>;
4040
/**
4141
* In event there was an error loading the src, specify a fallback JSX Element.
4242
*/

src/components/primitives/Link/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export interface InterfaceLinkProps extends InterfaceBoxProps<ILinkProps> {
3939
/**
4040
* Hover props. Accepts all styled system props.
4141
*/
42-
_hover?: Omit<ILinkProps, '_hover'>;
42+
_hover?: Omit<Partial<ILinkProps>, '_hover'>;
4343
/**
4444
* Ref to be attached to the Link wrapper
4545
*/

src/components/primitives/List/types.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ export interface IListProps extends IStackProps {
2828
/**
2929
* common _hover that is passed to all the children.
3030
*/
31-
_hover?: IStackProps;
31+
_hover?: Partial<IStackProps>;
3232
/**
3333
* common _focus that is passed to all the children.
3434
*/
35-
_focus?: IStackProps;
35+
_focus?: Partial<IStackProps>;
3636
/**
3737
* common _pressed that is passed to all the children.
3838
*/
39-
_pressed?: IStackProps;
39+
_pressed?: Partial<IStackProps>;
4040
/**
4141
* Ordered List index starting value.
4242
* @default 0
@@ -45,7 +45,7 @@ export interface IListProps extends IStackProps {
4545
/**
4646
* Props to style the commonly all the List.Item's text.
4747
*/
48-
_text?: ITextProps;
48+
_text?: Partial<ITextProps>;
4949
}
5050

5151
export interface IListItemProps extends IPressableProps {
@@ -73,7 +73,7 @@ export interface IListItemProps extends IPressableProps {
7373
/**
7474
* Props to style the child text.
7575
*/
76-
_text?: Omit<ITextProps, '_text'>;
76+
_text?: Partial<Omit<ITextProps, '_text'>>;
7777
}
7878
export type IListComponentType = ((
7979
props: IListProps & { ref?: any }

src/components/primitives/Pressable/types.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,20 @@ export interface InterfacePressableProps<T = IPressableProps>
2424
/**
2525
* Style props to be applied when hovered
2626
*/
27-
_hover?: Omit<IPressableProps, '_hover'>;
27+
_hover?: Omit<Partial<IPressableProps>, '_hover'>;
2828
/**
2929
* Style props to be applied when pressed
3030
*/
31-
_pressed?: Omit<IPressableProps, '_pressed'>;
31+
_pressed?: Omit<Partial<IPressableProps>, '_pressed'>;
3232
/**
3333
* Style props to be applied when focus
3434
*/
35-
_focus?: Omit<IPressableProps, '_focus'>;
35+
_focus?: Omit<Partial<IPressableProps>, '_focus'>;
3636

3737
/**
3838
* Style props to be applied when disabled
3939
*/
40-
_disabled?: Omit<IPressableProps, '_disabled'>;
40+
_disabled?: Omit<Partial<IPressableProps>, '_disabled'>;
4141

4242
/**
4343
* If true, the p will be disabled.
@@ -62,7 +62,7 @@ export interface InterfacePressableProps<T = IPressableProps>
6262
/**
6363
* Style props to be applied when focus visible. These styles will be only applied when user is interacting the app using a keyboard. (Web only)
6464
*/
65-
_focusVisible?: Omit<IPressableProps, '_focusVisible'>;
65+
_focusVisible?: Omit<Partial<IPressableProps>, '_focusVisible'>;
6666

6767
children?:
6868
| React.ReactNode

src/components/primitives/Select/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ export interface InterfaceSelectProps extends InterfaceBoxProps<ISelectProps> {
2323
/**
2424
* Item props passed here will be passed to each Select.Item component.
2525
*/
26-
_item?: IButtonProps;
26+
_item?: Partial<IButtonProps>;
2727
/**
2828
* Item props passed here will be passed to the selected Select.Item component.
2929
*/
30-
_selectedItem?: IButtonProps;
30+
_selectedItem?: Partial<IButtonProps>;
3131
/**
3232
* Currently selected value. Useful for controlling the Select state
3333
*/

src/components/primitives/Switch/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export interface InterfaceSwitchProps
6666
/**
6767
* Props when Switch is hovered. Accepts all the Switch props.
6868
*/
69-
_hover?: Omit<ISwitchProps, '_hover'>;
69+
_hover?: Omit<Partial<ISwitchProps>, '_hover'>;
7070
}
7171

7272
export type ISwitchProps = InterfaceSwitchProps & CustomProps<'Switch'>;

0 commit comments

Comments
 (0)