soda-material
Version:
A React(>=18) component library that may follow [Material Design 3](https://m3.material.io/components) (a.k.a. Material You)
54 lines (53 loc) • 1.9 kB
TypeScript
/// <reference types="react" />
import './time-picker.scss';
type TimeValue = readonly [hour: number, minute: number];
/**
* [warn]: data itself always use 24 hours system,
* but it's appearance varys by changing the `use24hourSystem` property
* @specs https://m3.material.io/components/time-pickers/specs
*/
export declare const TimePicker: import("react").ForwardRefExoticComponent<{
initValue?: TimeValue | undefined;
/**
* If is not spcified, will be vertical when screen width <= 600px, otherwise horizontal
*/
direction?: "horizontal" | "vertical" | undefined;
/**
* Use 12 hours system by default
*/
use24hourSystem?: boolean | undefined;
onOK?(time: TimeValue): void;
onCancel?(time: TimeValue): void;
i18n?: Partial<{
readonly select_time: "Select time";
readonly enter_time: "Enter time";
readonly hour: "Hour";
readonly minute: "Minute";
readonly am: "AM";
readonly pm: "PM";
readonly ok: "OK";
readonly cancel: "Cancel";
}> | undefined;
initShowClock?: boolean | undefined;
} & Omit<import("react").HTMLProps<HTMLElement>, "as" | "ref" | "direction" | "onOK" | "onCancel" | "initValue" | "use24hourSystem" | "i18n" | "initShowClock"> & import("react").RefAttributes<HTMLDivElement>>;
export declare const i18n_english: {
readonly select_time: "Select time";
readonly enter_time: "Enter time";
readonly hour: "Hour";
readonly minute: "Minute";
readonly am: "AM";
readonly pm: "PM";
readonly ok: "OK";
readonly cancel: "Cancel";
};
export declare const i18n_chinese: {
readonly select_time: "选择时间";
readonly enter_time: "输入时间";
readonly hour: "时";
readonly minute: "分";
readonly am: "上午";
readonly pm: "下午";
readonly ok: "确认";
readonly cancel: "取消";
};
export {};