1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-12-26 00:48:35 +00:00

Rename 'Selection' components to 'Menu' in 'LeftNavigation'

This commit is contained in:
Vasek Mlejnsky 2018-08-16 16:26:44 +02:00
parent a43112a6cf
commit 113b2535e0
6 changed files with 53 additions and 53 deletions

View File

@ -60,7 +60,7 @@ const RowAccount = ({
</Row>
</RowAccountWrapper>
</NavLink>
);
);
RowAccount.propTypes = {
accountIndex: PropTypes.number.isRequired,
url: PropTypes.string.isRequired,
@ -68,7 +68,7 @@ RowAccount.propTypes = {
isSelected: PropTypes.bool,
};
const AccountSelection = (props: Props): ?React$Element<string> => {
const AccountMenu = (props: Props): ?React$Element<string> => {
const selected = props.wallet.selectedDevice;
if (!selected) return null;
@ -204,4 +204,4 @@ const AccountSelection = (props: Props): ?React$Element<string> => {
);
};
export default AccountSelection;
export default AccountMenu;

View File

@ -37,7 +37,7 @@ const CoinName = ({
/>
<p>{text}</p>
</CoinNameWrapper>
);
);
CoinName.propTypes = {
coinImg: PropTypes.string.isRequired,
text: PropTypes.string.isRequired,
@ -70,7 +70,7 @@ const RowCoin = ({
)}
</Row>
</RowCoinWrapper>
);
);
RowCoin.propTypes = {
coin: PropTypes.shape({
img: PropTypes.string.isRequired,
@ -83,7 +83,7 @@ RowCoin.propTypes = {
};
class CoinSelection extends Component {
class CoinMenu extends Component {
getBaseUrl() {
const { selectedDevice } = this.props.wallet;
let baseUrl = '';
@ -147,11 +147,11 @@ class CoinSelection extends Component {
}
}
CoinSelection.propTypes = {
CoinMenu.propTypes = {
config: PropTypes.object,
wallet: PropTypes.object,
selectedDevice: PropTypes.object,
localStorage: PropTypes.object,
};
export default CoinSelection;
export default CoinMenu;

View File

@ -0,0 +1,4 @@
export { default as AccountMenu } from './AccountMenu';
export { default as CoinMenu } from './CoinMenu';
export { DeviceSelect } from './DeviceMenu';
export { DeviceDropdown } from './DeviceMenu';

View File

@ -1,4 +0,0 @@
export { default as AccountSelection } from './AccountSelection';
export { default as CoinSelection } from './CoinSelection';
export { DeviceSelect } from './DeviceSelection';
export { DeviceDropdown } from './DeviceSelection';

View File

@ -5,11 +5,11 @@ import styled from 'styled-components';
import type { TrezorDevice } from 'flowtype';
import {
AccountSelection,
CoinSelection,
AccountMenu,
CoinMenu,
DeviceSelect,
DeviceDropdown,
} from './Selection';
} from './Menu';
import StickyContainer from './StickyContainer';
import type { Props } from './index';
@ -72,7 +72,7 @@ const LeftNavigation = (props: Props): React$Element<typeof StickyContainer | st
animationType = 'slide-left';
// menu = (
// <TransitionMenu animationType="slide-left">
// <AccountSelection {...props} />
// <AccountMenu {...props} />
// </TransitionMenu>
// );
} else if (selected.features && !selected.features.bootloader_mode && selected.features.initialized) {
@ -81,7 +81,7 @@ const LeftNavigation = (props: Props): React$Element<typeof StickyContainer | st
animationType = 'slide-right';
// menu = (
// <TransitionMenu animationType="slide-right">
// <CoinSelection {...props} />
// <CoinMenu {...props} />
// </TransitionMenu>
// );
}
@ -97,8 +97,8 @@ const LeftNavigation = (props: Props): React$Element<typeof StickyContainer | st
<TransitionMenu
animationType={animationType}
>
{animationType === 'slide-left' && <AccountSelection key="accounts" {...props} />}
{animationType === 'slide-right' && <CoinSelection key="coins" {...props} />}
{animationType === 'slide-left' && <AccountMenu key="accounts" {...props} />}
{animationType === 'slide-right' && <CoinMenu key="coins" {...props} />}
</TransitionMenu>
)}