import type { ReactNode } from 'react'; import React from 'react'; import { Loader } from '../Loader/Loader'; /** @inheritdoc */ export interface WithLoaderProps { /** * Whether the loader should be displayed */ loading?: boolean; children: ReactNode; } export const InputLoader = ({ loading, children, ...rest }: WithLoaderProps) => { rest satisfies Record; return ( <> {children} {loading ? : null} ); };