UNPKG

@gechiui/block-editor

Version:
28 lines (27 loc) 819 B
import _extends from "@babel/runtime/helpers/esm/extends"; import { createElement } from "@gechiui/element"; /** * GeChiUI dependencies */ import { Button, Tooltip } from '@gechiui/components'; import { link, linkOff } from '@gechiui/icons'; import { __ } from '@gechiui/i18n'; export default function LinkedButton(_ref) { let { isLinked, ...props } = _ref; const label = isLinked ? __('取消链接整比例') : __('链接等比例'); return createElement(Tooltip, { text: label }, createElement(Button, _extends({}, props, { className: "component-border-radius-control__linked-button", isPrimary: isLinked, isSecondary: !isLinked, isSmall: true, icon: isLinked ? link : linkOff, iconSize: 16, "aria-label": label }))); } //# sourceMappingURL=linked-button.js.map