This repository was archived by the owner on Dec 13, 2018. It is now read-only.
Commit ce401a8 1 parent 8a21d8b commit ce401a8 Copy full SHA for ce401a8
File tree 2 files changed +22
-2
lines changed
2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -617,7 +617,7 @@ const BuiltinStyledWithFragment: JSX.Element = (
617
617
const cssProps = {
618
618
":active" : {
619
619
color : "purple"
620
- }
620
+ } ,
621
621
} ;
622
622
623
623
const BuiltinStyledWithCSSPseudoProps = (
@@ -626,3 +626,15 @@ const BuiltinStyledWithCSSPseudoProps = (
626
626
< glamorous . A css = { cssProps } />
627
627
</ div >
628
628
) ;
629
+
630
+ const nestedCssProps = [
631
+ { color : 'red' , } ,
632
+ ( ) => ( { fontSize : 123 } ) ,
633
+ ( ) => ( ) => ( ) => [ { border : '1px solid black' } ] ,
634
+ ] ;
635
+
636
+ const NestedStyleFunctions = (
637
+ < div >
638
+ < glamorous . Div css = { nestedCssProps } />
639
+ </ div >
640
+ )
Original file line number Diff line number Diff line change @@ -1933,6 +1933,14 @@ export interface CSSProperties
1933
1933
CSSPropertiesPseudo ,
1934
1934
CSSPropertiesLossy { }
1935
1935
1936
- export type CSSPropertiesRecursive = CSSProperties | CSSPropertiesArray
1936
+ export type CSSPropertiesRecursive =
1937
+ | CSSProperties
1938
+ | CSSPropertiesArray
1939
+ | CSSFunction
1940
+
1941
+ // TODO: This could be made generic. Issue PR if you're so inclined!
1942
+ export interface CSSFunction {
1943
+ ( props : { } ) : CSSPropertiesRecursive
1944
+ }
1937
1945
1938
1946
export interface CSSPropertiesArray extends Array < CSSPropertiesRecursive > { }
You can’t perform that action at this time.
0 commit comments