import { createElement } from "react"; /** * Internal dependencies */ import { VisuallyHidden } from '../visually-hidden'; import { Label as BaseLabel, LabelWrapper } from './styles/input-control-styles'; export default function Label({ children, hideLabelFromVision, htmlFor, ...props }) { if (!children) return null; if (hideLabelFromVision) { return createElement(VisuallyHidden, { as: "label", htmlFor: htmlFor }, children); } return createElement(LabelWrapper, null, createElement(BaseLabel, { htmlFor: htmlFor, ...props }, children)); } //# sourceMappingURL=label.js.map