mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* feat(react-dependents): update to ts 2.8 * fix version mismatches * remove package.json * post merge updates * add package.json back again
30 lines
939 B
TypeScript
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
|