@atlaskit/form
Version:
A form allows people to input information.
44 lines (43 loc) • 1.54 kB
JavaScript
/* 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';
const formSectionDescriptionStyles = null;
const formSectionWrapperStyles = null;
const FormSectionWrapper = ({
children
}) => {
// eslint-disable-next-line @atlaskit/design-system/use-primitives
return /*#__PURE__*/React.createElement("div", {
className: ax(["_1pfh1ejb"])
}, children);
};
const FormSectionDescription = ({
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).
*/
const FormSection = ({
children,
description,
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;