import type { HTMLAttributes, ReactElement, ReactNode } from "react"; import cn from "classnames"; import { bem } from "@react-md/utils"; const block = bem("rmd-form-message"); /** @remarks \@since 2.9.0 */ export interface FormMessageCounterProps extends HTMLAttributes { /** * The children to display in the counter. This is normally a string like: * * @example * String Example * ```ts * `${min} / ${max}` * ``` */ children: ReactNode; } /** * This component can be used to create a "counter" within the * {@link FormMessage} component. * * Note: This is really only useful when using the {@link FormMessage} component * without a {@link TextField}. * * @example * Example Usage * ```ts * interface ExampleProps { * min: number; * max: number; * } * * function Example({ min, max }: ExampleProps) { * return ( * * * {`${min} / ${max}`} * * * ); * } * ``` * * @remarks \@since 2.9.0 */ export function FormMessageCounter({ children, className, ...props }: FormMessageCounterProps): ReactElement { return ( {children} ); }