Updating AccountList to use darkmode colors (#13864)

feature/default_network_editable
George Marshall 3 years ago committed by GitHub
parent 88154a4161
commit 1607295feb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      ui/components/ui/account-list/account-list.js
  2. 67
      ui/components/ui/account-list/account-list.stories.js
  3. 20
      ui/components/ui/account-list/index.scss

@ -21,7 +21,6 @@ const AccountList = ({
}) => { }) => {
const t = useI18nContext(); const t = useI18nContext();
const selectedAccountScrollRef = useRef(null); const selectedAccountScrollRef = useRef(null);
useLayoutEffect(() => { useLayoutEffect(() => {
selectedAccountScrollRef.current?.scrollIntoView({ behavior: 'smooth' }); selectedAccountScrollRef.current?.scrollIntoView({ behavior: 'smooth' });
}, []); }, []);
@ -103,7 +102,7 @@ const AccountList = ({
className="choose-account-list__account__balance" className="choose-account-list__account__balance"
type={PRIMARY} type={PRIMARY}
value={balance} value={balance}
style={{ color: '#6A737D' }} style={{ color: 'var(--color-text-alternative)' }}
suffix={nativeCurrency} suffix={nativeCurrency}
/> />
</div> </div>

@ -0,0 +1,67 @@
import React from 'react';
import AccountList from '.';
export default {
title: 'Components/UI/AccountList', // title should follow the folder structure location of the component. Don't use spaces.
id: __filename,
argTypes: {
accounts: {
control: 'object',
},
selectNewAccountViaModal: {
action: 'selectNewAccountViaModal',
},
addressLastConnectedMap: {
control: 'object',
},
nativeCurrency: {
control: 'text',
},
selectedAccounts: {
control: 'object',
},
allAreSelected: {
action: 'allAreSelected',
},
deselectAll: {
action: 'deselectAll',
},
selectAll: {
action: 'selectAll',
},
handleAccountClick: {
action: 'handleAccountClick',
},
},
args: {
accounts: [
{
address: '0x64a845a5b02460acf8a3d84503b0d68d028b4bb4',
addressLabel: 'Account 1',
lastConnectedDate: 'Feb-22-2022',
balance: '8.7a73149c048545a3fe58',
has: () => {
/** nothing to do */
},
},
],
selectedAccounts: {
address: '0x64a845a5b02460acf8a3d84503b0d68d028b4bb4',
addressLabel: 'Account 2',
lastConnectedDate: 'Feb-22-2022',
balance: '8.7a73149c048545a3fe58',
has: () => {
/** nothing to do */
},
},
addressLastConnectedMap: {
'0x64a845a5b02460acf8a3d84503b0d68d028b4bb4': 'Feb-22-2022',
},
allAreSelected: () => true,
nativeCurrency: 'USD',
},
};
export const DefaultStory = (args) => <AccountList {...args} />;
DefaultStory.storyName = 'Default';

@ -42,7 +42,7 @@
flex: 2 1 0; flex: 2 1 0;
width: 100%; width: 100%;
max-height: max-content; max-height: max-content;
border: 1px solid #d0d5da; border: 1px solid var(--color-border-muted);
box-sizing: border-box; box-sizing: border-box;
border-radius: 8px; border-radius: 8px;
margin-top: 8px; margin-top: 8px;
@ -53,7 +53,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
padding: 16px; padding: 16px;
border-bottom: 1px solid #d2d8dd; border-bottom: 1px solid var(--color-border-muted);
justify-content: space-between; justify-content: space-between;
&:last-of-type { &:last-of-type {
@ -61,7 +61,7 @@
} }
&:hover { &:hover {
background: var(--Grey-000); background: var(--color-background-alternative);
cursor: pointer; cursor: pointer;
} }
@ -75,7 +75,7 @@
&__label { &__label {
@include H6; @include H6;
color: var(--Black-100); color: var(--color-text-default);
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
@ -84,7 +84,7 @@
&__balance { &__balance {
@include H7; @include H7;
color: var(--Grey-500); color: var(--color-text-default);
} }
&__last-connected { &__last-connected {
@ -93,7 +93,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: flex-end; align-items: flex-end;
color: var(--primary-blue); color: var(--color-primary-default);
} }
} }
@ -113,14 +113,14 @@
} }
.fa-info-circle { .fa-info-circle {
color: var(--Grey-200); color: var(--color-icon-muted);
cursor: pointer; cursor: pointer;
margin-inline-start: 8px; margin-inline-start: 8px;
font-size: 0.9rem; font-size: 0.9rem;
} }
.fa-info-circle:hover { .fa-info-circle:hover {
color: var(--Grey-300); color: var(--color-icon-default);
} }
&__text, &__text,
@ -130,11 +130,11 @@
} }
&__text-blue { &__text-blue {
color: var(--primary-blue); color: var(--color-primary-default);
cursor: pointer; cursor: pointer;
} }
&__text-grey { &__text-grey {
color: var(--Grey-500); color: var(--color-text-default);
} }
} }

Loading…
Cancel
Save