@gechiui/block-editor
Version:
30 lines (28 loc) • 712 B
JavaScript
import { createElement } from "@gechiui/element";
/**
* GeChiUI dependencies
*/
import { __ } from '@gechiui/i18n';
import { UnitControl } from '@gechiui/components';
/**
* Internal dependencies
*/
import { BASE_DEFAULT_VALUE, STEP, isLineHeightDefined } from './utils';
export default function LineHeightControl(_ref) {
let {
value: lineHeight,
onChange
} = _ref;
const isDefined = isLineHeightDefined(lineHeight);
const value = isDefined ? lineHeight : BASE_DEFAULT_VALUE;
return createElement(UnitControl, {
label: __('Line Height'),
min: 0,
max: 5,
step: STEP,
value: value,
onChange: onChange,
units: false
});
}
//# sourceMappingURL=index.native.js.map