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 => ( const renderItem = a => (
<Box horizontal alignItems="center"> <Box horizontal alignItems="center">
<Box grow> <Box grow>
<Text color="dark" fontSize={4} fontWeight="bold"> <Text ff="Open Sans|SemiBold" color="dark" fontSize={4}>
{a.name} {a.name}
</Text> </Text>
</Box> </Box>
<Box> <Box>
<FormattedVal val={a.balance} unit={a.unit} /> <FormattedVal color="grey" val={a.balance} unit={a.unit} />
</Box> </Box>
</Box> </Box>
) )

2
src/components/SelectAccount/stories.js

@ -14,7 +14,7 @@ const accounts = [...Array(20)].map(() => ({
id: chance.string(), id: chance.string(),
address: chance.string(), address: chance.string(),
addresses: [], addresses: [],
balance: chance.floating({ min: 0, max: 20 }), balance: chance.integer({ min: 10000000, max: 2000000000 }),
balanceByDay: {}, balanceByDay: {},
coinType: 0, coinType: 0,
currency: getCurrencyByCoinType(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)} innerRef={n => (this._children[i] = n)}
{...getItemProps({ item })} {...getItemProps({ item })}
> >
<Item highlighted={i === highlightedIndex} horizontal flow={10}> <Item highlighted={i === highlightedIndex} horizontal flow={2}>
<Box grow> <Box grow>
{renderItem ? ( {renderItem ? (
renderItem(item) renderItem(item)
@ -171,7 +171,7 @@ class Select extends PureComponent<Props> {
</Box> </Box>
<Box> <Box>
<IconSelected selected={selectedItem === item}> <IconSelected selected={selectedItem === item}>
<IconCheck height={15} width={15} /> <IconCheck height={7} width={7} />
</IconSelected> </IconSelected>
</Box> </Box>
</Item> </Item>

Loading…
Cancel
Save