Skip to content

Commit

Permalink
fix: omit css prop
Browse files Browse the repository at this point in the history
  • Loading branch information
michalkvasnicak committed Jun 4, 2021
1 parent 5b1f8b1 commit a65b596
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/visage-core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,12 @@ export type ComponentConstraint =
| keyof JSX.IntrinsicElements
| React.JSXElementConstructor<any>;

export type ExtractVisageComponentProps<T extends ComponentConstraint> =
export type ExtractVisageComponentProps<T extends ComponentConstraint> = Omit<
T extends VisageComponent<infer P>
? P & StyleProps
: ComponentProps<T> & StyleProps;
: ComponentProps<T> & StyleProps,
'css'
>;

export type OmittableProps<T extends { [key: string]: any }> = {
[K in keyof T]?: undefined | T[K];
Expand Down

0 comments on commit a65b596

Please sign in to comment.