@wordpress/components
Version:
UI components for WordPress.
40 lines (35 loc) • 830 B
JavaScript
;
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