UNPKG

@amsterdam/design-system-react

Version:

All React components from the Amsterdam Design System. Use it to compose pages in your website or application.

15 lines (14 loc) 840 B
import { jsx as _jsx } from "react/jsx-runtime"; /** * @license EUPL-1.2+ * Copyright Gemeente Amsterdam */ import clsx from 'clsx'; import { forwardRef } from 'react'; export const rowTags = ['article', 'div', 'section']; export const rowGapSizes = ['none', 'x-small', 'small', 'large', 'x-large']; /** * @see {@link https://designsystem.amsterdam/?path=/docs/components-layout-row--docs Row docs at Amsterdam Design System} */ export const Row = forwardRef(({ align, alignVertical, as: Tag = 'div', children, className, gap, wrap, ...restProps }, ref) => (_jsx(Tag, { ...restProps, className: clsx('ams-row', align && `ams-row--align-${align}`, alignVertical && `ams-row--align-vertical-${alignVertical}`, gap && `ams-row--gap-${gap}`, wrap && 'ams-row--wrap', className), ref: ref, children: children }))); Row.displayName = 'Row';