import * as React from 'react';

interface Props {
  htmlFor: string;
  children: React.ReactNode;
  className?: string;
}

export function Label({ htmlFor, children, className, ...rest }: Props) {
  return (
    <label className={`label ${className}`} htmlFor={htmlFor} {...rest}>
      {children}
    </label>
  );
}

Label.defaultProps = {
  className: '',
};
