mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-24 09:18:09 +00:00
Add folder structure
This commit is contained in:
parent
779bb84c01
commit
82c215dc81
@ -7,6 +7,7 @@ import { TRANSITION_TIME } from 'config/variables';
|
||||
|
||||
const Wrapper = styled.div`
|
||||
padding: 16px 24px;
|
||||
height: 100%;
|
||||
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
@ -29,6 +30,10 @@ const AsideRow = ({ children, column = false }) => (
|
||||
);
|
||||
|
||||
AsideRow.propTypes = {
|
||||
children: PropTypes.oneOfType([
|
||||
PropTypes.arrayOf(PropTypes.node),
|
||||
PropTypes.node,
|
||||
]),
|
||||
column: PropTypes.bool,
|
||||
};
|
||||
|
@ -3,14 +3,16 @@ import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { NavLink } from 'react-router-dom';
|
||||
|
||||
import AsideRow from './AsideRow';
|
||||
import AsideRow from '../AsideRow';
|
||||
|
||||
import colors from 'config/colors';
|
||||
import { FONT_SIZE, BORDER_WIDTH } from 'config/variables';
|
||||
|
||||
const Wrapper = styled.div`
|
||||
height: 64px;
|
||||
|
||||
font-size: ${FONT_SIZE.SMALL};
|
||||
color: ${colors.TEXT_PRIMARY};
|
||||
|
||||
border-top: 1px solid ${colors.DIVIDER};
|
||||
span {
|
||||
@ -18,7 +20,7 @@ const Wrapper = styled.div`
|
||||
color: ${colors.TEXT_SECONDARY};
|
||||
}
|
||||
|
||||
${props => props.selected && css`
|
||||
${props => props.isSelected && css`
|
||||
border-left: ${BORDER_WIDTH.SELECTED} solid ${colors.GREEN_PRIMARY};
|
||||
background: ${colors.WHITE};
|
||||
|
||||
@ -32,11 +34,11 @@ const Wrapper = styled.div`
|
||||
`}
|
||||
`;
|
||||
|
||||
const AsideRowAccount = ({ accountIndex, balance, url, selected }) => (
|
||||
const AsideRowAccount = ({ accountIndex, balance, url, isSelected = false }) => (
|
||||
<NavLink to={url}>
|
||||
<Wrapper
|
||||
to={url}
|
||||
selected={selected}
|
||||
isSelected={isSelected}
|
||||
>
|
||||
<AsideRow column>
|
||||
Account #{accountIndex + 1}
|
||||
@ -52,13 +54,9 @@ const AsideRowAccount = ({ accountIndex, balance, url, selected }) => (
|
||||
|
||||
AsideRowAccount.propTypes = {
|
||||
accountIndex: PropTypes.number.isRequired,
|
||||
balance: PropTypes.string,
|
||||
url: PropTypes.string.isRequired,
|
||||
selected: PropTypes.bool,
|
||||
};
|
||||
|
||||
AsideRowAccount.defaultProps = {
|
||||
selected: true,
|
||||
balance: PropTypes.string,
|
||||
isSelected: PropTypes.bool,
|
||||
};
|
||||
|
||||
export default AsideRowAccount;
|
@ -19,7 +19,7 @@ const Logo = styled.div`
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: auto ${ICON_SIZE.BASE};
|
||||
background-image: url('images/${props => props.coinImg}-logo.png');
|
||||
background-image: url('${props => props.coinImg}');
|
||||
`;
|
||||
|
||||
const CoinName = ({ coinImg, text }) => (
|
Loading…
Reference in New Issue
Block a user