diff --git a/packages/components/src/input-control/input-base.tsx b/packages/components/src/input-control/input-base.tsx index 9151ae14c78f8..adcc1cbd5be81 100644 --- a/packages/components/src/input-control/input-base.tsx +++ b/packages/components/src/input-control/input-base.tsx @@ -22,6 +22,7 @@ import { LabelWrapper, } from './styles/input-control-styles'; import type { InputBaseProps, LabelPosition } from './types'; +import type { FlexProps } from '../flex/types'; function useUniqueId( idProp?: string ) { const instanceId = useInstanceId( InputBase ); @@ -65,7 +66,7 @@ export function InputBase( size = 'default', suffix, ...props - }: InputBaseProps, + }: InputBaseProps & FlexProps, ref: ForwardedRef< HTMLDivElement > ) { const id = useUniqueId( idProp ); diff --git a/packages/components/src/input-control/types.ts b/packages/components/src/input-control/types.ts index 0bc27aa56cc35..3a3d34f9c4fcc 100644 --- a/packages/components/src/input-control/types.ts +++ b/packages/components/src/input-control/types.ts @@ -14,7 +14,6 @@ import type { useDrag } from '@use-gesture/react'; * Internal dependencies */ import type { StateReducer } from './reducer/state'; -import type { FlexProps } from '../flex/types'; import type { WordPressComponentProps } from '../ui/context'; export type LabelPosition = 'top' | 'bottom' | 'side' | 'edge'; @@ -56,7 +55,7 @@ export interface InputFieldProps extends BaseProps { onDrag?: ( dragProps: DragProps ) => void; } -export interface InputBaseProps extends BaseProps, FlexProps { +export interface InputBaseProps extends BaseProps { children: ReactNode; prefix?: ReactNode; suffix?: ReactNode;