UNPKG

@shopgate/engage

Version:
4 lines 897 B
import React from'react';import{RippleButton,I18n,SurroundPortals}from'@shopgate/engage/components';import{button,ripple}from"./ChangeLocationButton.style";import{PRODUCT_FULFILLMENT_CHANGE_LOCATION}from"../../constants/Portals";/** * @param {Object} props . * @returns {JSX} */export var ChangeLocationButtonUnwrapped=function ChangeLocationButtonUnwrapped(_ref){var onClick=_ref.onClick,disabled=_ref.disabled;return React.createElement(SurroundPortals,{portalName:PRODUCT_FULFILLMENT_CHANGE_LOCATION,portalProps:{onClick:onClick,disabled:disabled}},React.createElement(RippleButton,{onClick:onClick,className:button,disabled:disabled,rippleClassName:ripple,type:"secondary",flat:true},React.createElement(I18n.Text,{string:"locations.change_location"})));};ChangeLocationButtonUnwrapped.defaultProps={disabled:false};export var ChangeLocationButton=React.memo(ChangeLocationButtonUnwrapped);