UNPKG

@workday/canvas-kit-react

Version:

The parent module that contains all Workday Canvas Kit React components

21 lines (20 loc) 1.29 kB
import React from 'react'; import { createSubcomponent } from '@workday/canvas-kit-react/common'; import { handleCsProp, createStencil } from '@workday/canvas-kit-styling'; import { useFormFieldModel } from './hooks'; import { system } from '@workday/canvas-tokens-web'; /** * @deprecated `formFieldContainerStencil` is deprecated and will be removed in a future major version. Please use `FormField.Field` to always wrap `FormField.Input` and `FormField.Hint` to always ensure correct label and input alignment. */ export const formFieldContainerStencil = createStencil({ base: { name: "d5h44m", styles: "box-sizing:border-box;display:flex;flex-direction:column;gap:var(--cnvs-sys-space-x2);" } }, "form-field-container-b7ba71"); /** * @deprecated `FormField.Container` is deprecated and will be removed in a future major version. Please use `FormField.Field` to always wrap `FormField.Input` and `FormField.Hint` to always ensure correct label and input alignment. */ export const FormFieldContainer = createSubcomponent('div')({ displayName: 'FormField.Container', modelHook: useFormFieldModel, })((elemProps, Element, model) => { return (React.createElement(Element, { "data-width": "ck-formfield-width", ...handleCsProp(elemProps, formFieldContainerStencil()) })); });