diff --git a/src/components/ButtonSelect.tsx b/src/components/ButtonSelect.tsx new file mode 100644 index 00000000..ec9b55f0 --- /dev/null +++ b/src/components/ButtonSelect.tsx @@ -0,0 +1,25 @@ +import React from "react"; + +export function ButtonSelect({ + options, + value, + onChange +}: { + options: { value: T; text: string }[]; + value: T | null; + onChange: (value: T) => void; +}) { + return ( +
+ {options.map(option => ( + + ))} +
+ ); +} diff --git a/src/components/ColorPicker.tsx b/src/components/ColorPicker.tsx new file mode 100644 index 00000000..65dfc78b --- /dev/null +++ b/src/components/ColorPicker.tsx @@ -0,0 +1,52 @@ +import React from "react"; +import { TwitterPicker } from "react-color"; + +export function ColorPicker({ + color, + onChange +}: { + color: string | null; + onChange: (color: string) => void; +}) { + const [isActive, setActive] = React.useState(false); + return ( +
+ - ))} -
- ); -} - -function ColorPicker({ - color, - onChange -}: { - color: string | null; - onChange: (color: string) => void; -}) { - const [isActive, setActive] = React.useState(false); - return ( -
-