-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCardActions.tsx
30 lines (28 loc) · 933 Bytes
/
CardActions.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import React from "react";
import "./CardActions.css";
import ActionButton from "./ActionButton";
import { Link } from "react-router-dom";
import qrCodeIcon from "../images/qrCodeIcon.svg";
import type { ButtonClickHandler } from "../clickHandler";
const CardActions: React.FC<{
newClick: ButtonClickHandler;
clearClick: ButtonClickHandler;
shareClick: ButtonClickHandler;
}> = ({ newClick, clearClick, shareClick }) => {
return (
<div className="CardActions">
<ActionButton text="New card" onClick={newClick} activeDuration={100} />
<ActionButton text="Clear" onClick={clearClick} activeDuration={100} />
<ActionButton
text="Share"
changeText="Copied"
onClick={shareClick}
activeDuration={1500}
/>
<Link className="QRCodeButton" to="qr_code">
<img src={qrCodeIcon} alt="QR code Icon" />
</Link>
</div>
);
};
export default CardActions;