Created
September 8, 2020 16:01
-
-
Save perjo927/ec0e3bc7009c2da77e45647a99942d83 to your computer and use it in GitHub Desktop.
Undo Template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { html } from "lit-html"; | |
export const Undo = ({ disabled, onClick }) => { | |
const className = `${disabled ? "disabled" : ""}`; | |
const onUndo = disabled ? () => {} : onClick; | |
return html` | |
<div class=${className} @click=${onUndo}> | |
<svg | |
xmlns="http://www.w3.org/2000/svg" | |
viewBox="0 0 24 24" | |
fill="black" | |
width="36px" | |
height="36px" | |
> | |
<path d="M0 0h24v24H0V0z" fill="none" /> | |
<path | |
d="M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z" | |
/> | |
</svg> | |
</div> | |
`; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment