mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-08-03 23:24:19 -07:00
Adds download packet to methodology page (Sprint 4 designs) (#578)
* adds responsive download packet * adds tests and intl
This commit is contained in:
parent
e8bafc813d
commit
b3f63c29f6
7 changed files with 118 additions and 79 deletions
59
client/src/components/DownloadPacket/index.tsx
Normal file
59
client/src/components/DownloadPacket/index.tsx
Normal file
|
@ -0,0 +1,59 @@
|
|||
import React from 'react';
|
||||
import {Button, Grid} from '@trussworks/react-uswds';
|
||||
import {useIntl} from 'gatsby-plugin-intl';
|
||||
import {defineMessages} from 'react-intl';
|
||||
|
||||
import * as styles from './downloadPacket.module.scss';
|
||||
import * as constants from '../../data/constants';
|
||||
// @ts-ignore
|
||||
import downloadIcon from '/node_modules/uswds/dist/img/usa-icons/file_download.svg';
|
||||
|
||||
const DownloadPacket = () => {
|
||||
const intl = useIntl();
|
||||
const messages = defineMessages({
|
||||
downloadPacketHeader: {
|
||||
id: 'downloadPacket.header.text',
|
||||
defaultMessage: 'Draft communities list (pre-decisional, 137MB)',
|
||||
description: 'download packet header text',
|
||||
},
|
||||
downloadPacketInfo: {
|
||||
id: 'downloadPacket.info.text',
|
||||
defaultMessage: 'The package includes the draft list of prioritized communities (.csv and .xlsx) and'+
|
||||
' information about how to use the list (.pdf). This information should not be used' +
|
||||
' to make program resource allocation decisions.',
|
||||
description: 'download packet info text',
|
||||
},
|
||||
downloadPacketButtonText: {
|
||||
id: 'downloadPacket.button.text',
|
||||
defaultMessage: 'Download packet',
|
||||
description: 'download packet button text',
|
||||
},
|
||||
});
|
||||
|
||||
return (
|
||||
<Grid>
|
||||
<div className={styles.downloadBoxContainer}>
|
||||
<div className={styles.downloadBox}>
|
||||
<div className={styles.downloadBoxTextBox}>
|
||||
<div className={styles.downloadBoxTitle}>{intl.formatMessage(messages.downloadPacketHeader)}</div>
|
||||
<div className={styles.downloadBoxText}>
|
||||
{intl.formatMessage(messages.downloadPacketInfo)}
|
||||
</div>
|
||||
<div className={styles.downloadBoxButtonContainer}>
|
||||
<a data-cy={'download-link'} href={constants.DOWNLOAD_ZIP_URL}>
|
||||
<Button className={styles.downloadBoxButton} type="button">
|
||||
<div><img src={downloadIcon} /> </div>
|
||||
<div className={styles.downloadPacketText}>
|
||||
{intl.formatMessage(messages.downloadPacketButtonText)}
|
||||
</div>
|
||||
</Button>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Grid>
|
||||
);
|
||||
};
|
||||
|
||||
export default DownloadPacket;
|
Loading…
Add table
Add a link
Reference in a new issue