UNPKG

@amaui/ui-react

Version:
36 lines (35 loc) 1.29 kB
import React from 'react'; import { AmauiDate } from '@amaui/date'; import { IRoundMeter } from '../RoundMeter/RoundMeter'; import { ITonal, IColor, ISize } from '../types'; export type TClockValue = AmauiDate; export type TClockFormat = '12' | '24'; export type TClockUnit = 'hour' | 'minute' | 'second'; export type TClockDayTime = 'am' | 'pm'; export interface IClock extends IRoundMeter { tonal?: ITonal; color?: IColor; value?: TClockValue; valueDefault?: TClockValue; onChange?: (value: TClockValue) => any; selecting?: TClockUnit; selectingDefault?: TClockUnit; onChangeSelecting?: (value: TClockUnit) => any; size?: ISize; format?: TClockFormat; dayTime?: TClockDayTime; hour?: boolean; minute?: boolean; second?: boolean; autoNext?: boolean; min?: AmauiDate; max?: AmauiDate; validate?: (value: AmauiDate) => boolean; readOnly?: boolean; disabled?: boolean; valid?: (value: AmauiDate, selecting: TClockUnit) => any; renderValue?: (value: TClockValue, version: TClockUnit, x: number, y: number, valueNumber: number, otherProps: any) => React.ReactNode; onDoneSelecting?: (value: TClockValue, selecting: TClockUnit) => any; } declare const Clock: React.FC<IClock>; export default Clock;