@wix/design-system
Version:
@wix/design-system
16 lines • 949 B
JavaScript
import React from 'react';
import ToggleButton from '../../../ToggleButton';
import { LockUnlocked, LockLocked } from '@wix/wix-ui-icons-common';
import { dataHooks } from '../../CornerRadiusInput.constants';
const LinkingButton = ({ size, isLinkingEnabled, setLinking, linkingButtonLabels, onLinkedToggle, }) => {
return (React.createElement(ToggleButton, { size: size, dataHook: dataHooks.autoScaleButton, border: true, selected: isLinkingEnabled, labelValue: isLinkingEnabled
? linkingButtonLabels?.pressed
: linkingButtonLabels?.unpressed, labelPlacement: "tooltip", onClick: () => {
setLinking(prev => !prev);
onLinkedToggle?.(!isLinkingEnabled);
}, tooltipProps: {
textAlign: 'center',
} }, isLinkingEnabled ? React.createElement(LockLocked, null) : React.createElement(LockUnlocked, null)));
};
export { LinkingButton };
//# sourceMappingURL=LinkingButton.js.map