UNPKG

@atlaskit/form

Version:

A form allows people to input information.

41 lines (40 loc) 1.71 kB
/* form-section.tsx generated by @compiled/babel-plugin v0.39.1 */ import "./form-section.compiled.css"; import * as React from 'react'; import { ax, ix } from "@compiled/react/runtime"; import Heading from '@atlaskit/heading'; var formSectionDescriptionStyles = null; var formSectionWrapperStyles = null; var FormSectionWrapper = function FormSectionWrapper(_ref) { var children = _ref.children; // eslint-disable-next-line @atlaskit/design-system/use-primitives return /*#__PURE__*/React.createElement("div", { className: ax(["_1pfh1ejb"]) }, children); }; var FormSectionDescription = function FormSectionDescription(_ref2) { var children = _ref2.children; // eslint-disable-next-line @atlaskit/design-system/use-primitives return /*#__PURE__*/React.createElement("div", { className: ax(["_1pfhu2gc"]) }, children); }; /** * __Form section__. * * A form section is used to define a section of a form layout. This contains a section title, content * and a description of the section. * * - [Examples](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout) * - [Code](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout) * - [Usage](https://atlaskit.atlassian.com/packages/design-system/form/docs/layout). */ var FormSection = function FormSection(_ref3) { var children = _ref3.children, description = _ref3.description, title = _ref3.title; return /*#__PURE__*/React.createElement(FormSectionWrapper, null, title && /*#__PURE__*/React.createElement(Heading, { size: "medium" }, title), description && /*#__PURE__*/React.createElement(FormSectionDescription, null, description), children); }; export default FormSection;