Skip to content

Commit

Permalink
refactor: DP => A2
Browse files Browse the repository at this point in the history
  • Loading branch information
sparten11740 committed Oct 23, 2024
1 parent 518db3a commit d42aef9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const styled = <P extends object, S extends object = object, A extends Partial<P
// Extend the Styled component with custom methods
const StyledComponent = Object.assign(Styled, {
extend: <SP2 extends object>(more: ComponentStyle<P, SP & SP2, S>) => styled(StyledComponent, { name })(more),
attrs: <DP extends P>(attrs: Attrs<DP>) => styled(StyledComponent, { attrs })() as StyledComponent<WithOptional<P, keyof DP>, S>,
attrs: <A2 extends P>(attrs: Attrs<A2>) => styled(StyledComponent, { attrs })() as StyledComponent<WithOptional<P, keyof A2>, S>,
withComponent: (comp: React.ComponentType<any>) =>
styled(StyledComponent, { comp })(componentStyle) as StyledComponent<P & SP, S>,
withChild: (child: React.ComponentType<any>, childProps: any) =>
Expand Down

0 comments on commit d42aef9

Please sign in to comment.