UNPKG

zent

Version:

一套前端设计语言和基于React的实现

14 lines (13 loc) 600 B
import { __assign } from "tslib"; import { jsx as _jsx } from "react/jsx-runtime"; import cx from 'classnames'; import { useContext } from 'react'; import { FormContext } from './context'; export var Label = function (_a) { var children = _a.children, required = _a.required; var labelStyle = useContext(FormContext).labelStyle; return (_jsx("label", __assign({ className: cx('zent-form-label', { 'zent-form-label-required': required, 'zent-form-label-empty': !children, }), style: labelStyle, "data-zv": '10.0.17' }, { children: children }), void 0)); };