Browse Source

Fix SelectAccount

master
Loëck Vézien 7 years ago
parent
commit
bba148262d
No known key found for this signature in database GPG Key ID: CBCDCE384E853AC4
  1. 4
      src/components/SelectAccount/index.js
  2. 2
      src/components/SelectAccount/stories.js
  3. 4
      src/components/base/Select/index.js

4
src/components/SelectAccount/index.js

@ -22,12 +22,12 @@ const mapStateToProps = state => ({
const renderItem = a => (
<Box horizontal alignItems="center">
<Box grow>
<Text color="dark" fontSize={4} fontWeight="bold">
<Text ff="Open Sans|SemiBold" color="dark" fontSize={4}>
{a.name}
</Text>
</Box>
<Box>
<FormattedVal val={a.balance} unit={a.unit} />
<FormattedVal color="grey" val={a.balance} unit={a.unit} />
</Box>
</Box>
)

2
src/components/SelectAccount/stories.js

@ -14,7 +14,7 @@ const accounts = [...Array(20)].map(() => ({
id: chance.string(),
address: chance.string(),
addresses: [],
balance: chance.floating({ min: 0, max: 20 }),
balance: chance.integer({ min: 10000000, max: 2000000000 }),
balanceByDay: {},
coinType: 0,
currency: getCurrencyByCoinType(0),

4
src/components/base/Select/index.js

@ -161,7 +161,7 @@ class Select extends PureComponent<Props> {
innerRef={n => (this._children[i] = n)}
{...getItemProps({ item })}
>
<Item highlighted={i === highlightedIndex} horizontal flow={10}>
<Item highlighted={i === highlightedIndex} horizontal flow={2}>
<Box grow>
{renderItem ? (
renderItem(item)
@ -171,7 +171,7 @@ class Select extends PureComponent<Props> {
</Box>
<Box>
<IconSelected selected={selectedItem === item}>
<IconCheck height={15} width={15} />
<IconCheck height={7} width={7} />
</IconSelected>
</Box>
</Item>

Loading…
Cancel
Save