UNPKG

@gechiui/block-editor

Version:
33 lines (31 loc) 941 B
import _extends from "@babel/runtime/helpers/esm/extends"; import { createElement } from "@gechiui/element"; /** * GeChiUI dependencies */ import { __experimentalUnitControl as UnitControl } from '@gechiui/components'; import { __ } from '@gechiui/i18n'; /** * Internal dependencies */ import { getAllValue, hasMixedValues, hasDefinedValues } from './utils'; export default function AllInputControl(_ref) { let { onChange, values, ...props } = _ref; const allValue = getAllValue(values); const hasValues = hasDefinedValues(values); const isMixed = hasValues && hasMixedValues(values); const allPlaceholder = isMixed ? __('混合') : null; return createElement(UnitControl, _extends({}, props, { "aria-label": __('边框半径'), disableUnits: isMixed, isOnly: true, value: allValue, onChange: onChange, placeholder: allPlaceholder })); } //# sourceMappingURL=all-input-control.js.map