-
Alexandru Munteanu authored
fixed every component in the styleguide
27c56d44
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
import React from 'react'
import { Spinner } from '@pubsweet/ui'
import { compose, withState } from 'recompose'
import { Item } from 'pubsweet-component-faraday-ui'
import { withZipDownload } from './helpers'
const DownloadZipFiles = ({ disabled, fetching, children, downloadFiles }) => (
<Item
flex={0}
justify="flex-end"
mr={1}
onClick={!disabled ? downloadFiles : null}
>
{fetching ? <Spinner /> : children}
</Item>
)
export default compose(
withState('fetching', 'setFetching', false),
withZipDownload,
)(DownloadZipFiles)