UNPKG

@amsterdam/design-system-react

Version:

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

21 lines (20 loc) 758 B
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; /** * @license EUPL-1.2+ * Copyright Gemeente Amsterdam */ /** * @license EUPL-1.2+ * Copyright (c) 2021 Robbert Broersma * Copyright Gemeente Amsterdam */ import clsx from 'clsx'; import { forwardRef } from 'react'; import { Hint } from '../Hint'; /** * @see {@link https://designsystem.amsterdam/?path=/docs/components-forms-label--docs Label docs at Amsterdam Design System} */ export const Label = forwardRef(({ children, className, hint, optional, ...restProps }, ref) => { return (_jsxs("label", { ...restProps, className: clsx('ams-label', className), ref: ref, children: [children, " ", _jsx(Hint, { hint: hint, optional: optional })] })); }); Label.displayName = 'Label';