Skip to content

Commit

Permalink
Finance filters refresh (aragon#767)
Browse files Browse the repository at this point in the history
Improve the filters layout:

- Move TransfersFilters to its own component.
- Make the layout work at all sizes.
- Update the download button so it looks like the other icon buttons.
- Update some labels:
  - “Date range” => “Period”
  - “Transfer type” => “Type” (since it is already below the “Transfers” title).
- Select the last 90 days (rolling) by default.
  • Loading branch information
bpierre authored Apr 17, 2019
1 parent db1c990 commit 5dceecc
Show file tree
Hide file tree
Showing 5 changed files with 313 additions and 316 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ const StyledDatePickersContainer = styled.div`
display: flex;
flex-direction: row;
align-items: baseline;
left: -250px;
`
)}
`
Expand Down
21 changes: 21 additions & 0 deletions apps/finance/app/src/components/DownloadButton.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from 'react'
import { ButtonIcon } from '@aragon/ui'
import IconDownload from './IconDownload'

const Download = ({ url, filename, ...props }) => (
<ButtonIcon
href={url}
download={filename}
rel="noopener noreferrer"
label="Download"
css={`
height: 40px;
padding-top: 4px;
`}
{...props}
>
<IconDownload />
</ButtonIcon>
)

export default Download
Original file line number Diff line number Diff line change
@@ -1,20 +1,4 @@
import React from 'react'
import { ButtonIcon } from '@aragon/ui'

const Download = props => (
<ButtonIcon
{...props}
css={`
width: auto;
height: 100%;
padding: 0 8px;
margin: 0 8px;
`}
label="Download"
>
<IconDownload />
</ButtonIcon>
)

const IconDownload = props => (
<svg
Expand All @@ -35,4 +19,4 @@ const IconDownload = props => (
</svg>
)

export default Download
export default IconDownload
Loading

0 comments on commit 5dceecc

Please sign in to comment.