mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-08 14:25:41 +03:00
Includes additional handlers for adding/removing masks, as well as click to copy configs fixes #523
18 lines
459 B
JavaScript
18 lines
459 B
JavaScript
import { h } from 'preact';
|
|
|
|
const noop = () => {};
|
|
|
|
export default function Button({ children, className, color = 'blue', onClick, size, ...attrs }) {
|
|
return (
|
|
<div
|
|
role="button"
|
|
tabindex="0"
|
|
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>
|
|
);
|
|
}
|