1
Fork 0
mirror of https://github.com/Steffo99/bluelib.git synced 2024-12-23 03:54:21 +00:00
bluelib/src/types.ts

25 lines
673 B
TypeScript
Raw Normal View History

import * as React from "react"
import Color from "color"
import {Argument as ClassNamesArgument} from "classnames"
2021-08-16 17:10:23 +00:00
export type ClassNames = ClassNamesArgument
2021-08-19 21:01:11 +00:00
export type State<Value> = [Value, React.Dispatch<React.SetStateAction<Value>>]
export type StateContext<Value> = React.Context<State<Value> | undefined>
2021-08-19 21:01:11 +00:00
export interface BluelibProps {
bluelibClassNames?: ClassNames,
customColor?: typeof Color,
disabled?: boolean,
}
export interface BluelibHTMLProps<Element extends HTMLElement> extends BluelibProps, React.HTMLProps<Element> {}
export type InputValue = readonly string[] | string | number | undefined
export type Validity = boolean | null