import cx from 'classnames';
import React from 'react';
import { classNameForBodyText } from '~/styles/classNameForBodyText';
import { classNameForHeadingText } from '~/styles/classNameForHeadingText';
import styles from './Label.module.css';
export function Label({ error, secondary, htmlFor, 'data-tag': dataTag, id, children }) {
    const classList = cx(styles.root, {
        [styles.hasError]: error,
        [classNameForBodyText({ size: 'md' })]: secondary,
        [classNameForHeadingText({ size: 'sm' })]: !secondary,
    });
    return (<label className={classList} data-tag={dataTag} htmlFor={htmlFor} id={id}>
      {children}
    </label>);
}
//# sourceMappingURL=index.jsx.map