Skip to content

Commit

Permalink
fix: typing making state optinal
Browse files Browse the repository at this point in the history
  • Loading branch information
Viraj-10 committed Nov 3, 2022
1 parent 8588323 commit 8a84829
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/factory/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ import type { IStateProps } from '../hooks/useThemeProps/propsFlattener';
export type FactoryComponentProps = StyledProps &
PlatformProps<StyledProps> & {
children?: string | JSX.Element | JSX.Element[];
state: IStateProps;
state?: IStateProps;
};
2 changes: 1 addition & 1 deletion src/hooks/useThemeProps/usePropsWithComponentTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { IStateProps } from './propsFlattener';
export function usePropsWithComponentTheme(
localTheme: ComponentTheme,
propsReceived: any,
state: IStateProps
state?: IStateProps
) {
return usePropsResolutionWithComponentTheme(localTheme, propsReceived, state);
}

0 comments on commit 8a84829

Please sign in to comment.