DefinitelyTyped/types/reactcss/index.d.ts
Ferdy Budhidharma bc0c933415 feat(react-dependents): update to TS 2.8 (part 2 of 2) (#27744)
* feat(react-dependents): update to ts 2.8

* fix version mismatches

* remove package.json

* post merge updates

* add package.json back again
2018-08-06 06:28:42 +01:00

30 lines
939 B
TypeScript

// Type definitions for ReactCSS 1.2.0
// Project: http://reactcss.com/
// Definitions by: Chris Gervang <https://github.com/chrisgervang>, Karol Janyst <https://github.com/LKay>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import * as React from "react"
interface LoopableProps extends React.Props<any> {
"nth-child": number
"first-child"?: boolean
"last-child"?: boolean
even?: boolean
odd?: boolean
}
interface HoverProps<T> extends React.Props<T> {
hover?: boolean
}
interface Classes<T> {
default: Partial<T>
[scope: string]: Partial<T>
}
export type CSS = React.CSSProperties
export function hover<A>(component: React.ComponentClass<A> | React.StatelessComponent<A>): React.ComponentClass<A>
export function loop(index: number, length: number): LoopableProps
export default function reactCSS<T>(classes: Classes<T>, ...activations: Array<any>): T