TypeScript definitions for ReactCSS
npm install @hoory/type-reactcssnpm install --save @types/reactcss
ts
// Type definitions for ReactCSS 1.2.0
// Project: http://reactcss.com/
// Definitions by: Chris Gervang , Karol Janyst
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8import * as React from "react"
interface LoopableProps {
children?: React.ReactNode;
ref?: React.LegacyRef | undefined;
"nth-child": number
"first-child"?: boolean | undefined
"last-child"?: boolean | undefined
even?: boolean | undefined
odd?: boolean | undefined
}
interface HoverProps {
children?: React.ReactNode;
ref?: React.LegacyRef | undefined;
hover?: boolean | undefined
}
interface Classes {
default: Partial
[scope: string]: Partial
}
export type CSS = React.CSSProperties
export function hover(component: React.ComponentClass | React.FunctionComponent): React.ComponentClass
export function loop(index: number, length: number): LoopableProps
export default function reactCSS(classes: Classes, ...activations: Array): T
```