UNPKG

@shopify/polaris

Version:

Shopify’s product component library

25 lines (22 loc) 862 B
import React$1 from 'react'; import { useFeatures } from '../../utilities/features/hooks.js'; import { classNames } from '../../utilities/css.js'; import styles from './Layout.scss.js'; import { AnnotatedSection as AnnotatedSection$1 } from './components/AnnotatedSection/AnnotatedSection.js'; import { Section as Section$1 } from './components/Section/Section.js'; var Layout = function Layout({ sectioned, children }) { var { newDesignLanguage } = useFeatures(); var content = sectioned ? /*#__PURE__*/React$1.createElement(Section$1, null, children) : children; var className = classNames(styles.Layout, newDesignLanguage && styles.newDesignLanguage); return /*#__PURE__*/React$1.createElement("div", { className: className }, content); }; Layout.AnnotatedSection = AnnotatedSection$1; Layout.Section = Section$1; export { Layout };