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

TypeScript: Add recursive array type to CSS prop #383

Merged
merged 2 commits into from
Feb 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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