UNPKG

@workday/canvas-kit-react

Version:

The parent module that contains all Workday Canvas Kit React components

29 lines (28 loc) 778 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.useFormFieldOrientation = void 0; const tokens_1 = require("@workday/canvas-kit-react/tokens"); /** * Adds the necessary layout props to a `FormField` component. * * @deprecated */ const useFormFieldOrientation = (orientation) => { let layoutProps; if (orientation === 'horizontal') { layoutProps = { flexDirection: 'row', gap: tokens_1.space.l, alignItems: undefined, }; } else { layoutProps = { flexDirection: 'column', gap: tokens_1.space.xxxs, alignItems: 'flex-start', }; } return layoutProps; }; exports.useFormFieldOrientation = useFormFieldOrientation;