Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Commit

Permalink
fix(TypeScript): add recursive array type to CSS prop (#383)
Browse files Browse the repository at this point in the history
* Add recursive array type to CSS prop

* Remove unused import
  • Loading branch information
quicksnap authored and Kent C. Dodds committed Feb 17, 2018
1 parent a2dcedf commit 47f8428
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions typings/css-properties.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1932,3 +1932,7 @@ export interface CSSProperties
extends CSSPropertiesComplete,
CSSPropertiesPseudo,
CSSPropertiesLossy {}

export type CSSPropertiesRecursive = CSSProperties | CSSPropertiesArray

export interface CSSPropertiesArray extends Array<CSSPropertiesRecursive> {}
4 changes: 2 additions & 2 deletions typings/glamorous-component.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {CSSProperties} from './css-properties'
import {CSSPropertiesRecursive} from './css-properties'

import {Component} from './glamorous'

Expand All @@ -20,7 +20,7 @@ export interface ExtraGlamorousProps {
/**
* Same type as any of the styles provided, will be merged with this component's styles and take highest priority over the component's predefined styles
*/
css?: CSSProperties
css?: CSSPropertiesRecursive
theme?: object
}

Expand Down

0 comments on commit 47f8428

Please sign in to comment.