feat(pixel-perfecting): add eye on Receive view buttons
This commit is contained in:
parent
069913ebf6
commit
d4ae30805f
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
|
@ -86,21 +86,23 @@ export const Button = ({
|
|||
}: Props) => {
|
||||
if (to && onClick) throw new Error('Should define either "to" or "onClick"');
|
||||
|
||||
const props = { onClick, disabled: disabled || isLoading, icon: null, className };
|
||||
const props = {
|
||||
onClick, disabled: disabled || isLoading, icon: null, className,
|
||||
};
|
||||
const buttonLabel = isLoading ? 'Loading...' : label;
|
||||
|
||||
const component = variant === 'primary' ? (
|
||||
<Primary {...props}>
|
||||
{icon ?
|
||||
<Icon src={icon} />
|
||||
{icon
|
||||
? <Icon src={icon} />
|
||||
: null
|
||||
}
|
||||
{buttonLabel}
|
||||
</Primary>
|
||||
) : (
|
||||
<Secondary {...props}>
|
||||
{icon ?
|
||||
<Icon src={icon} />
|
||||
{icon
|
||||
? <Icon src={icon} />
|
||||
: null
|
||||
}
|
||||
{buttonLabel}
|
||||
|
@ -112,6 +114,7 @@ export const Button = ({
|
|||
|
||||
Button.defaultProps = {
|
||||
to: '',
|
||||
icon: null,
|
||||
variant: 'primary',
|
||||
onClick: null,
|
||||
disabled: false,
|
||||
|
|
|
@ -8,6 +8,8 @@ import { QRCode } from './qrcode';
|
|||
|
||||
import truncateAddress from '../utils/truncateAddress';
|
||||
|
||||
import eyeIcon from '../assets/images/eye.png';
|
||||
|
||||
const AddressWrapper = styled.div`
|
||||
align-items: center;
|
||||
display: flex;
|
||||
|
@ -82,6 +84,7 @@ export class WalletAddress extends Component<Props, State> {
|
|||
onFocus={event => event.currentTarget.select()}
|
||||
/>
|
||||
<Button
|
||||
icon={eyeIcon}
|
||||
label={`${isVisible ? 'Hide' : 'Show'} full address and QR Code`}
|
||||
onClick={toggleVisibility}
|
||||
variant='secondary'
|
||||
|
|
Loading…
Reference in New Issue