UNPKG

@wordpress/components

Version:
40 lines (35 loc) 830 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _utils = require("../utils"); var _hook = require("./hook"); /** * Internal dependencies */ /** * `ControlLabel` is a form component that works with `FormGroup` to provide a * label for form elements (e.g. `Switch` or `TextInput`). * * ```jsx * import { ControlLabel, FormGroup, TextInput } from '@wordpress/components/ui'; * * function Example() { * return ( * <FormGroup> * <ControlLabel>First Name</ControlLabel> * <TextInput /> * </FormGroup> * ); * } * ``` */ const ControlLabel = (0, _utils.createComponent)({ as: 'label', useHook: _hook.useControlLabel, name: 'ControlLabel' }); var _default = ControlLabel; exports.default = _default; //# sourceMappingURL=component.js.map