UNPKG

@create-figma-plugin/ui

Version:

Production-grade Preact components that replicate the Figma UI design

13 lines 664 B
import { h, toChildArray } from 'preact'; import { createClassName } from '../../utilities/create-class-name.js'; import { createComponent } from '../../utilities/create-component.js'; import styles from './columns.module.css'; export const Columns = createComponent(function ({ children, space, ...rest }, ref) { return (h("div", { ...rest, ref: ref, class: createClassName([ styles.columns, typeof space === 'undefined' ? null : styles[space] ]) }, toChildArray(children).map(function (element, index) { return (h("div", { key: index, class: styles.child }, element)); }))); }); //# sourceMappingURL=columns.js.map