Skip to content

Commit

Permalink
fix: type CreateStyledComponent to accept string and object
Browse files Browse the repository at this point in the history
  • Loading branch information
FourwingsY committed Dec 21, 2024
1 parent fe3483a commit 100a463
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/pigment-css-react/src/styled.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ export interface CreateStyledComponent<
Component extends React.ElementType,
OuterProps extends object,
> {
// Template Literal case
(
styles: TemplateStringsArray,
...args: Array<((options: ThemeArgs) => Primitve) | Primitve | React.ComponentClass>
...args: Array<((options: ThemeArgs) => Primitve)| Primitve | React.ComponentClass | StyledArgument<OuterProps>>
): StyledComponent<OuterProps> & (Component extends string ? BaseDefaultProps : Component);

/**
Expand Down

0 comments on commit 100a463

Please sign in to comment.