Browse Source
Merge pull request #130 from meriadec/master
Fix dropdown display issues
master
Loëck Vézien
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
15 additions and
21 deletions
-
src/components/DashboardPage/AccountsOrder.js
-
src/components/TopBar.js
-
src/components/base/DropDown/index.js
|
|
@ -14,7 +14,6 @@ import { getOrderAccounts } from 'reducers/settings' |
|
|
|
import { updateOrderAccounts } from 'actions/accounts' |
|
|
|
import { saveSettings } from 'actions/settings' |
|
|
|
|
|
|
|
import Box from 'components/base/Box' |
|
|
|
import DropDown from 'components/base/DropDown' |
|
|
|
import Text from 'components/base/Text' |
|
|
|
import IconAngleDown from 'icons/AngleDown' |
|
|
@ -62,10 +61,6 @@ class AccountsOrder extends Component<Props, State> { |
|
|
|
const { t } = this.props |
|
|
|
const { cachedValue } = this.state |
|
|
|
|
|
|
|
if (!cachedValue) { |
|
|
|
return null |
|
|
|
} |
|
|
|
|
|
|
|
const sortItems = [ |
|
|
|
{ |
|
|
|
key: 'name', |
|
|
@ -87,11 +82,13 @@ class AccountsOrder extends Component<Props, State> { |
|
|
|
items={sortItems} |
|
|
|
ff="Open Sans|SemiBold" |
|
|
|
fontSize={4} |
|
|
|
flow={1} |
|
|
|
color="dark" |
|
|
|
horizontal |
|
|
|
align="center" |
|
|
|
> |
|
|
|
<Box horizontal align="center" flow={1} color="dark"> |
|
|
|
<Text color="dark">{t(`orderAccounts.${cachedValue}`)}</Text> |
|
|
|
<Text color="dark">{t(`orderAccounts.${cachedValue || 'balance'}`)}</Text> |
|
|
|
<IconAngleDown height={7} width={8} /> |
|
|
|
</Box> |
|
|
|
</DropDown> |
|
|
|
) |
|
|
|
} |
|
|
|
|
|
@ -158,11 +158,14 @@ class TopBar extends PureComponent<Props, State> { |
|
|
|
ff="Open Sans|SemiBold" |
|
|
|
fontSize={4} |
|
|
|
offsetTop={-2} |
|
|
|
align="center" |
|
|
|
justify="center" |
|
|
|
flow={1} |
|
|
|
color="warmGrey" |
|
|
|
horizontal |
|
|
|
> |
|
|
|
<Box horizontal align="center" flow={1} color="warmGrey"> |
|
|
|
<Box>{'Khalil Benihoud'}</Box> |
|
|
|
<IconAngleDown height={7} width={8} /> |
|
|
|
</Box> |
|
|
|
</DropDown> |
|
|
|
</Box> |
|
|
|
</Inner> |
|
|
|
|
|
@ -98,14 +98,8 @@ class DropDown extends PureComponent<Props> { |
|
|
|
selectedItem, |
|
|
|
...downshiftProps |
|
|
|
}) => ( |
|
|
|
<Box |
|
|
|
{...getRootProps({ refKey: 'innerRef' })} |
|
|
|
horizontal |
|
|
|
align="center" |
|
|
|
relative |
|
|
|
{...props} |
|
|
|
> |
|
|
|
<Trigger {...getButtonProps()} tabIndex={0}> |
|
|
|
<Box {...getRootProps({ refKey: 'innerRef' })} horizontal relative> |
|
|
|
<Trigger {...getButtonProps()} tabIndex={0} {...props}> |
|
|
|
{children} |
|
|
|
</Trigger> |
|
|
|
{isOpen && this.renderItems(items, selectedItem, downshiftProps)} |
|
|
|