1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +01:00

Dark mode: Updating currency input icon (#14152)

This commit is contained in:
George Marshall 2022-03-23 10:53:56 -07:00 committed by GitHub
parent 00e64eb6c1
commit 90e4b35db5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 34 additions and 16 deletions

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3L5 6.99h3V14h2V6.99h3L9 3z"/><path d="M0 0h24v24H0z" fill="none"/></svg>

Before

Width:  |  Height:  |  Size: 209 B

View File

@ -160,7 +160,9 @@ export default function CurrencyInput({
onChange={handleChange}
value={decimalValue}
actionComponent={
<div className="currency-input__swap-component" onClick={swap} />
<button className="currency-input__swap-component" onClick={swap}>
<i className="fa fa-retweet fa-lg" />
</button>
}
>
{renderConversionComponent()}

View File

@ -0,0 +1,25 @@
import React from 'react';
import CurrencyInput from '.';
export default {
title: 'Components/App/CurrencyInput',
id: __filename,
argTypes: {
hexValue: {
control: 'text',
},
featureSecondary: {
control: 'boolean',
},
onChange: {
action: 'onChange',
},
onPreferenceToggle: {
action: 'onPreferenceToggle',
},
},
};
export const DefaultStory = (args) => <CurrencyInput {...args} />;
DefaultStory.storyName = 'Default';

View File

@ -7,20 +7,12 @@
&__swap-component {
flex: 0 0 auto;
height: 24px;
width: 24px;
background-image: url("images/icons/swap.svg");
background-size: contain;
background-repeat: no-repeat;
display: flex;
align-items: center;
justify-content: center;
color: var(--color-icon-default);
cursor: pointer;
opacity: 0.4;
&:hover {
opacity: 0.3;
}
&:active {
opacity: 0.5;
}
background: none;
border: none;
}
}