@@ -67,6 +67,11 @@ declare module '@wordpress/components' {
6767
6868 export type LabelPosition = 'top' | 'bottom' | 'side' | 'edge' ;
6969
70+ export type TimeInputValue = {
71+ hours : number ;
72+ minutes : number ;
73+ } ;
74+
7075 export type VirtualElement = Pick < Element , 'getBoundingClientRect' > & {
7176 ownerDocument ?: Document ;
7277 } ;
@@ -1382,6 +1387,17 @@ declare module '@wordpress/components' {
13821387 className ?: string ;
13831388 }
13841389
1390+ /**
1391+ * @link https://github.com/WordPress/gutenberg/blob/trunk/packages/components/src/date-time/types.ts
1392+ */
1393+ interface TimeInput {
1394+ is12Hour ?: boolean ;
1395+ value ?: TimeInputValue ;
1396+ defaultValue ?: TimeInputValue ;
1397+ minutesProps ?: NumberControl ;
1398+ onChange ?: ( time : TimeInputValue ) => void ;
1399+ }
1400+
13851401 /**
13861402 * @link https://github.com/WordPress/gutenberg/blob/trunk/packages/components/src/date-time/time/index.tsx
13871403 */
@@ -1503,6 +1519,7 @@ declare module '@wordpress/components' {
15031519 export const TextControl : ComponentType < TextControl > ;
15041520 export const TextareaControl : ComponentType < TextareaControl > ;
15051521 export const TextHighlight : ComponentType < TextHighlight > ;
1522+ export const TimeInput : ComponentType < TimeInput > ;
15061523 export const TimePicker : ComponentType < TimePicker > ;
15071524 export const ToggleControl : ComponentType < ToggleControl > ;
15081525 export const ToolbarButton : ComponentType < ToolbarButton > ;
@@ -1564,6 +1581,7 @@ declare module '@wordpress/components' {
15641581 TextControl : ComponentType < TextControl > ;
15651582 TextareaControl : ComponentType < TextareaControl > ;
15661583 TextHighlight : ComponentType < TextHighlight > ;
1584+ TimeInput : ComponentType < TimeInput > ;
15671585 TimePicker : ComponentType < TimePicker > ;
15681586 ToggleControl : ComponentType < ToggleControl > ;
15691587 ToolbarButton : ComponentType < ToolbarButton > ;
0 commit comments