fix(web): mask zone editor to handle object filter masks

Includes additional handlers for adding/removing masks, as well as click to copy configs

fixes #523
This commit is contained in:
Paul Armstrong
2021-01-15 12:29:30 -08:00
committed by Blake Blackshear
parent 3c072f94b0
commit d39111a294
6 changed files with 663 additions and 298 deletions

View File

@@ -2,13 +2,14 @@ import { h } from 'preact';
const noop = () => {};
export default function Button({ children, color, onClick, size }) {
export default function Button({ children, className, color = 'blue', onClick, size, ...attrs }) {
return (
<div
role="button"
tabindex="0"
className="rounded bg-blue-500 text-white pl-4 pr-4 pt-2 pb-2 font-bold shadow hover:bg-blue-400 hover:shadow-lg cursor-pointer"
className={`rounded bg-${color}-500 text-white pl-4 pr-4 pt-2 pb-2 font-bold shadow hover:bg-${color}-400 hover:shadow-lg cursor-pointer ${className}`}
onClick={onClick || noop}
{...attrs}
>
{children}
</div>