import React from "react";
import PropTypes from "prop-types";
import styling from "@devcake/styling";
import '../init'

styling.setDefault("components.label.classes", "text-sm font-semibold text-gray-800");

export interface LabelProps {
  children: React.ReactNode;
  className?: string;
}

export const Label = ({ children, className }: LabelProps) => (
  <div
    className={[className, styling.get("components.label.classes")].join(" ")}
  >
    {children}
  </div>
);

Label.propTypes = {
  children: PropTypes.element.isRequired,
  className: PropTypes.string
};