UNPKG

@wordpress/components

Version:
43 lines (39 loc) 1.35 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.InputControlSuffixWrapper = void 0; var _context = require("../context"); var _inputControlStyles = require("./styles/input-control-styles"); var _jsxRuntime = require("react/jsx-runtime"); /** * External dependencies */ /** * Internal dependencies */ function UnconnectedInputControlSuffixWrapper(props, forwardedRef) { const derivedProps = (0, _context.useContextSystem)(props, 'InputControlSuffixWrapper'); return /*#__PURE__*/(0, _jsxRuntime.jsx)(_inputControlStyles.PrefixSuffixWrapper, { ...derivedProps, ref: forwardedRef }); } /** * A convenience wrapper for the `suffix` when you want to apply * standard padding in accordance with the size variant. * * ```jsx * import { * __experimentalInputControl as InputControl, * __experimentalInputControlSuffixWrapper as InputControlSuffixWrapper, * } from '@wordpress/components'; * * <InputControl * suffix={<InputControlSuffixWrapper>%</InputControlSuffixWrapper>} * /> * ``` */ const InputControlSuffixWrapper = exports.InputControlSuffixWrapper = (0, _context.contextConnect)(UnconnectedInputControlSuffixWrapper, 'InputControlSuffixWrapper'); var _default = exports.default = InputControlSuffixWrapper; //# sourceMappingURL=input-suffix-wrapper.js.map