UNPKG

@gechiui/components

Version:
32 lines (30 loc) 879 B
import _extends from "@babel/runtime/helpers/esm/extends"; import { createElement } from "@gechiui/element"; /** * GeChiUI dependencies */ import { link, linkOff } from '@gechiui/icons'; import { __ } from '@gechiui/i18n'; /** * Internal dependencies */ import Button from '../button'; import Tooltip from '../tooltip'; export default function LinkedButton(_ref) { let { isLinked, ...props } = _ref; const label = isLinked ? __('解除等比例调整') : __('等比例调整'); return createElement(Tooltip, { text: label }, createElement("span", null, createElement(Button, _extends({}, props, { className: "component-box-control__linked-button", variant: isLinked ? 'primary' : 'secondary', isSmall: true, icon: isLinked ? link : linkOff, iconSize: 16, "aria-label": label })))); } //# sourceMappingURL=linked-button.js.map