1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-24 09:18:09 +00:00

Merge branch 'styled-components-refactor' of github.com:satoshilabs/trezor-wallet into styled-components-refactor

This commit is contained in:
Vladimir Volek 2018-08-16 16:59:00 +02:00
commit bd54457fb6
5 changed files with 46 additions and 46 deletions

View File

@ -13,9 +13,9 @@ import { findDeviceAccounts } from 'reducers/AccountsReducer';
import { FONT_SIZE, BORDER_WIDTH } from 'config/variables'; import { FONT_SIZE, BORDER_WIDTH } from 'config/variables';
import type { Accounts } from 'flowtype'; import type { Accounts } from 'flowtype';
import type { Props } from './index'; import type { Props } from '../../common';
import Row from '../Row'; import Row from '../../Row';
const RowAccountWrapper = styled.div` const RowAccountWrapper = styled.div`
height: 64px; height: 64px;
@ -45,22 +45,22 @@ const RowAccountWrapper = styled.div`
const RowAccount = ({ const RowAccount = ({
accountIndex, balance, url, isSelected = false, accountIndex, balance, url, isSelected = false,
}) => ( }) => (
<NavLink to={url}> <NavLink to={url}>
<RowAccountWrapper <RowAccountWrapper
to={url} to={url}
isSelected={isSelected} isSelected={isSelected}
> >
<Row column> <Row column>
Account #{accountIndex + 1} Account #{accountIndex + 1}
{balance ? ( {balance ? (
<span>{balance}</span> <span>{balance}</span>
) : ( ) : (
<span>Loading...</span> <span>Loading...</span>
)} )}
</Row> </Row>
</RowAccountWrapper> </RowAccountWrapper>
</NavLink> </NavLink>
); );
RowAccount.propTypes = { RowAccount.propTypes = {
accountIndex: PropTypes.number.isRequired, accountIndex: PropTypes.number.isRequired,
url: PropTypes.string.isRequired, url: PropTypes.string.isRequired,

View File

@ -10,8 +10,8 @@ import styled from 'styled-components';
import { FONT_SIZE, ICON_SIZE } from 'config/variables'; import { FONT_SIZE, ICON_SIZE } from 'config/variables';
import Divider from '../Divider'; import Divider from '../../Divider';
import Row from '../Row'; import Row from '../../Row';
const CoinNameWrapper = styled.div` const CoinNameWrapper = styled.div`
display: flex; display: flex;
@ -31,13 +31,13 @@ const Logo = styled.div`
const CoinName = ({ const CoinName = ({
coinImg, text, coinImg, text,
}) => ( }) => (
<CoinNameWrapper> <CoinNameWrapper>
<Logo <Logo
coinImg={coinImg} coinImg={coinImg}
/> />
<p>{text}</p> <p>{text}</p>
</CoinNameWrapper> </CoinNameWrapper>
); );
CoinName.propTypes = { CoinName.propTypes = {
coinImg: PropTypes.string.isRequired, coinImg: PropTypes.string.isRequired,
text: PropTypes.string.isRequired, text: PropTypes.string.isRequired,
@ -56,21 +56,21 @@ const RowCoinWrapper = styled.div`
const RowCoin = ({ const RowCoin = ({
coin, icon, coin, icon,
}) => ( }) => (
<RowCoinWrapper> <RowCoinWrapper>
<Row> <Row>
<CoinName <CoinName
coinImg={coin.img} coinImg={coin.img}
text={coin.name} text={coin.name}
/>
{icon && (
<Icon
icon={icon.type}
color={icon.color}
/> />
{icon && ( )}
<Icon </Row>
icon={icon.type} </RowCoinWrapper>
color={icon.color} );
/>
)}
</Row>
</RowCoinWrapper>
);
RowCoin.propTypes = { RowCoin.propTypes = {
coin: PropTypes.shape({ coin: PropTypes.shape({
img: PropTypes.string.isRequired, img: PropTypes.string.isRequired,

View File

@ -4,9 +4,9 @@ import TrezorConnect from 'trezor-connect';
import type { TrezorDevice } from 'flowtype'; import type { TrezorDevice } from 'flowtype';
import type { Props } from '../common'; import type { Props } from '../../common';
import AsideDivider from '../Divider'; import AsideDivider from '../../Divider';
export const DeviceSelect = (props: Props) => { export const DeviceSelect = (props: Props) => {
const { devices } = props; const { devices } = props;

View File

@ -9,10 +9,10 @@ import {
CoinMenu, CoinMenu,
DeviceSelect, DeviceSelect,
DeviceDropdown, DeviceDropdown,
} from './Menu'; } from './NavigationMenu';
import StickyContainer from './StickyContainer'; import StickyContainer from './StickyContainer';
import type { Props } from './index'; import type { Props } from './common';
type TransitionMenuProps = { type TransitionMenuProps = {
animationType: string; animationType: string;

View File

@ -9,10 +9,10 @@ import type { State, Dispatch } from 'flowtype';
import Header from 'components/Header'; import Header from 'components/Header';
import Footer from 'components/Footer'; import Footer from 'components/Footer';
import DeviceSettingsTabs from 'components/wallet/pages/DeviceSettingsTabs';
import ModalContainer from 'components/modal'; import ModalContainer from 'components/modal';
import Notifications from 'components/Notification'; import Notifications from 'components/Notification';
import Log from 'components/Log'; import Log from 'components/Log';
import DeviceSettingsTabs from './views/DeviceSettingsTabs';
import LeftNavigation from './components/LeftNavigation/Container'; import LeftNavigation from './components/LeftNavigation/Container';
import AccountTabs from './components/Tabs'; import AccountTabs from './components/Tabs';