Update download dropdown style (#3399)
* Update translation * Move dropdown header to top of list * Do not wrap header in download dropdown GitOrigin-RevId: 326428272592fc54f9915d5946877e59a60f967e
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { Dropdown, MenuItem, OverlayTrigger, Tooltip } from 'react-bootstrap'
|
||||
import { useTranslation, Trans } from 'react-i18next'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import Icon from '../../../shared/components/icon'
|
||||
|
||||
export const topFileTypes = ['bbl', 'gls', 'ind']
|
||||
@@ -77,11 +77,11 @@ function PreviewDownloadButton({
|
||||
bsStyle="info"
|
||||
/>
|
||||
<Dropdown.Menu id="download-dropdown-list">
|
||||
<MenuItem header>{t('other_output_files')}</MenuItem>
|
||||
<FileList list={topFiles} listType="main" />
|
||||
{otherFiles.length > 0 && topFiles.length > 0 ? (
|
||||
<>
|
||||
<MenuItem divider />
|
||||
<MenuItem header>{t('other_output_files')}</MenuItem>
|
||||
</>
|
||||
) : (
|
||||
<></>
|
||||
@@ -102,11 +102,7 @@ function FileList({ listType, list }) {
|
||||
return list.map((file, index) => {
|
||||
return (
|
||||
<MenuItem download href={file.url} key={`${listType}-${index}`}>
|
||||
<Trans
|
||||
i18nKey="download_file"
|
||||
components={[<strong />]}
|
||||
values={{ type: file.fileName }}
|
||||
/>
|
||||
<b>{file.fileName}</b>
|
||||
</MenuItem>
|
||||
)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user