Files
supabase/packages/ui-patterns/form/FormItemLayout/FormItemLayout.tsx
Jonathan Summers-Muir d5765e7127 Feat/form item layout (#21835)
* init FormInput

* fix imports

* more clean up

* Update FormLayout.tsx

* Update FormLayout.tsx

* adding size prop

* more updates

* moved things. added checkbox

* check in

* Update FormLayout.tsx

* Select now has a SelectItem

* layouts moved

* fix type errors

* add layout stories

* update story

* refactored layout to be easier to maintain. dropped the defaultTheme support

* update Form

* update Badge

* remove old code

* remove more

* more

* Update index.tsx

* clean up

* Update preview.css

* fix type errors

* Update index.tsx

* Update InfoTooltip.tsx

* fix issues

* add seperator

* Update FormLayout.tsx

* match styles to old component
2024-03-08 06:27:16 +00:00

21 lines
551 B
TypeScript

import { ElementRef, forwardRef } from 'react'
import { FormItem_Shadcn_ } from 'ui'
import { FormLayout } from '../Layout/FormLayout'
const FormItemLayout = forwardRef<
ElementRef<typeof FormLayout>,
React.ComponentPropsWithoutRef<typeof FormLayout> // Use any as placeholder types
>(({ ...props }, ref) => {
return (
<FormItem_Shadcn_>
<FormLayout ref={ref} isReactForm {...props}>
{props.children}
</FormLayout>
</FormItem_Shadcn_>
)
})
FormItemLayout.displayName = 'FormItemLayout'
export { FormItemLayout }