diff --git a/packages/react/src/components/FormItem/FormItem.js b/packages/react/src/components/FormItem/FormItem.tsx similarity index 72% rename from packages/react/src/components/FormItem/FormItem.js rename to packages/react/src/components/FormItem/FormItem.tsx index 6e75ae1ff309..82a21b87b8dd 100644 --- a/packages/react/src/components/FormItem/FormItem.js +++ b/packages/react/src/components/FormItem/FormItem.tsx @@ -10,7 +10,19 @@ import React from 'react'; import classnames from 'classnames'; import { usePrefix } from '../../internal/usePrefix'; -function FormItem({ className, children, ...rest }) { +type FormItemProps = { + /** + * Provide content to be rendered in the form item + */ + children?: React.ReactNode; + + /** + * Provide a custom className to be applied to the containing node + */ + className?: string; +}; + +function FormItem({ className, children, ...rest }: FormItemProps) { const prefix = usePrefix(); const classNames = classnames(`${prefix}--form-item`, className); diff --git a/packages/react/src/components/FormItem/index.js b/packages/react/src/components/FormItem/index.ts similarity index 100% rename from packages/react/src/components/FormItem/index.js rename to packages/react/src/components/FormItem/index.ts