on 21dab37 help sign in
bridge/src/components/Buttons.js
38 lines 1.2 kB history raw
1import React from 'react';
2import { Button } from 'indigo-react';
3import { Icon } from '@tlon/indigo-react';
5import { blinkIf } from './Blinky';
6import WithTooltip from './WithTooltip';
8// NOTE: the -> is correct because inter recognizes the pair
9export const ForwardButton = ({ loading, ...props }) => (
10 <Button accessory={blinkIf(loading, '->')} {...props} />
11);
12export const DownloadButton = ({ loading, ...props }) => (
13 <Button accessory={blinkIf(loading, '↓')} {...props} />
14);
15export const RestartButton = props => <Button accessory="↺" {...props} />;
16export const GenerateButton = ({ loading, ...props }) => (
17 <Button accessory={blinkIf(loading, '○')} solid {...props} />
18);
19export const OutButton = props => (
20 <Button as="a" target="_blank" accessory="↗" {...props} />
21);
23export const OfflineButton = props => (
24 <OutButton {...props} href="https://github.com/urbit/bridge/releases">
25 Offline
26 </OutButton>
27);
29export const CopyButton = ({ didCopy = false, ...props }) => (
30 <Button
31 accessory={
32 <WithTooltip content={didCopy ? 'Copied!' : 'Copy'}>
33 <Icon icon="Copy" size="18px" color={'black'} />
34 </WithTooltip>
35 }
36 {...props}
37 />
38);