on 703ff86 help sign in
bridge/src/components/DownloadKeyfileButton.jsx
33 lines 653 B history raw
1import React from 'react';
2import { B } from 'indigo-react';
4import { DownloadButton } from 'components/Buttons';
6export default function DownloadKeyfileButton({
7 // useKeyfileGenerator.bind
8 generating,
9 available,
10 downloaded,
11 download,
12 notice,
14 // from caller
15 className,
16 children = 'Download Keyfile',
17 ...rest
18}) {
19 return (
20 <DownloadButton
21 as="span"
22 className={className}
23 disabled={!available}
24 disabledDetail={
25 !available && <B className="wrap ws-normal">· {notice}</B>
26 }
27 loading={generating}
28 onClick={download}
29 {...rest}>
30 {children}
31 </DownloadButton>
32 );