@@ -20,14 +20,6 @@ import type { YakTheme } from "./context/index.d.ts";
2020 */
2121const noTheme : YakTheme = { } ;
2222
23- /**
24- * Minimal type for a function component that works with next-yak
25- */
26- type FunctionComponent < T > = (
27- props : T ,
28- context ?: any ,
29- ) => React . ReactNode | React . ReactElement ;
30-
3123/**
3224 * All valid html tags
3325 */
@@ -70,7 +62,7 @@ type Attrs<
7062// https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/constructors/styled.tsx
7163// https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/models/StyledComponent.ts
7264//
73- const StyledFactory = < T , > ( Component : HtmlTags | FunctionComponent < T > ) =>
65+ const StyledFactory = < T , > ( Component : HtmlTags | React . FunctionComponent < T > ) =>
7466 Object . assign ( yakStyled ( Component ) , {
7567 attrs : <
7668 TAttrsIn extends object = { } ,
@@ -89,13 +81,13 @@ type YakComponent<
8981 T ,
9082 TAttrsIn extends object = { } ,
9183 TAttrsOut extends AttrsMerged < T , TAttrsIn > = AttrsMerged < T , TAttrsIn > ,
92- > = FunctionComponent <
84+ > = React . FunctionComponent <
9385 T & {
9486 css ?: StaticCSSProp ;
9587 }
9688> & {
9789 [ yakComponentSymbol ] : [
98- FunctionComponent < T > ,
90+ React . FunctionComponent < T > ,
9991 AttrsFunction < T , TAttrsIn , TAttrsOut > ,
10092 ] ;
10193} ;
@@ -106,7 +98,7 @@ const yakStyled = <
10698 TAttrsOut extends AttrsMerged < T , TAttrsIn > = AttrsMerged < T , TAttrsIn > ,
10799> (
108100 Component :
109- | FunctionComponent < T >
101+ | React . FunctionComponent < T >
110102 | YakComponent < T , TAttrsIn , TAttrsOut >
111103 | HtmlTags ,
112104 attrs ?: Attrs < T , TAttrsIn , TAttrsOut > ,
0 commit comments