59 lines
1.5 KiB
TypeScript
59 lines
1.5 KiB
TypeScript
import * as React from 'react';
|
|
export interface Props {
|
|
/**
|
|
* Sets a CSS class on the component.
|
|
*/
|
|
className?: string,
|
|
id?: string;
|
|
/**
|
|
* A key used to uniquely identify the element within an Array
|
|
*/
|
|
key?: string,
|
|
/**
|
|
* Inline style
|
|
*/
|
|
style?: any,
|
|
/**
|
|
* Tooltip text
|
|
* APPLIES ONLY IF THE COMPONENT IS WRAPPED WITH Tooltip.
|
|
* @see http://react-toolbox.com/#/components/tooltip
|
|
*/
|
|
tooltip?: string,
|
|
/**
|
|
* Amount of time in miliseconds spent before the tooltip is visible.
|
|
* APPLIES ONLY IF THE COMPONENT IS WRAPPED WITH Tooltip.
|
|
* @see http://react-toolbox.com/#/components/tooltip
|
|
*/
|
|
tooltipDelay?: number,
|
|
/**
|
|
* If true, the Tooltip hides after a click in the host component.
|
|
* APPLIES ONLY IF THE COMPONENT IS WRAPPED WITH Tooltip.
|
|
* @default true
|
|
* @see http://react-toolbox.com/#/components/tooltip
|
|
*/
|
|
tooltipHideOnClick?: boolean,
|
|
}
|
|
/**
|
|
* Properties of components that have values that can be changed (T is the type of the value)
|
|
*/
|
|
export interface Changeable<T> {
|
|
/**
|
|
* Callback called when the picker value is changed.
|
|
* @param v Type of the value
|
|
*/
|
|
onChange?: (v: T) => void
|
|
}
|
|
export interface TimePickerProps extends Props, Changeable<Date> {
|
|
/**
|
|
* Format to display the clock. It can be 24hr or ampm.
|
|
* @default 24hr
|
|
*/
|
|
format?: string,
|
|
/**
|
|
* Datetime object with currrently selected time
|
|
*/
|
|
value?: Date,
|
|
}
|
|
export default class TimePicker extends React.Component<TimePickerProps, {}> {
|
|
render(): React.DOMElement<any, any>;
|
|
} |