mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-03 06:11:48 +00:00
Created button to use when anything needs to be exported
This commit is contained in:
17
src/utils/ExportBtn.tsx
Normal file
17
src/utils/ExportBtn.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import { FC } from 'react';
|
||||
import { Button } from 'reactstrap';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { faFileDownload } from '@fortawesome/free-solid-svg-icons';
|
||||
import { prettify } from './helpers/numbers';
|
||||
|
||||
interface ExportBtnProps {
|
||||
onClick: () => void;
|
||||
amount?: number;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export const ExportBtn: FC<ExportBtnProps> = ({ onClick, className, amount = 0 }) => (
|
||||
<Button outline color="primary" className={className} onClick={onClick}>
|
||||
<FontAwesomeIcon icon={faFileDownload} /> Export ({prettify(amount)})
|
||||
</Button>
|
||||
);
|
||||
Reference in New Issue
Block a user