UNPKG

@workday/canvas-kit-react

Version:

The parent module that contains all Workday Canvas Kit React components

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