UNPKG

@amsterdam/design-system-react

Version:

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

14 lines (13 loc) 562 B
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; /** * @license EUPL-1.2+ * Copyright (c) 2021 Robbert Broersma * Copyright Gemeente Amsterdam */ import clsx from 'clsx'; import { forwardRef } from 'react'; import { Hint } from '../Hint'; 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';