@react-md/form
Version:
This package is for creating all the different form input types.
44 lines (43 loc) • 1.11 kB
TypeScript
import type { HTMLAttributes, ReactElement, ReactNode } from "react";
/** @remarks \@since 2.9.0 */
export interface FormMessageCounterProps extends HTMLAttributes<HTMLSpanElement> {
/**
* 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 (
* <FormMessage disableWrap>
* <FormMessageCounter>
* {`${min} / ${max}`}
* </FormMessageCounter>
* </FormMessage>
* );
* }
* ```
*
* @remarks \@since 2.9.0
*/
export declare function FormMessageCounter({ children, className, ...props }: FormMessageCounterProps): ReactElement;