diff --git a/examples/web/react/app.tsx b/examples/web/react/app.tsx index 8210c83b5e44494a6744be2b93e0806ce1cc9768..111f3a0efd062da5164e54d4322228fd7ef469ea 100644 --- a/examples/web/react/app.tsx +++ b/examples/web/react/app.tsx @@ -482,6 +482,9 @@ export const App: FC<AppProps> = ({ const onThemeClick = () => { setBackgroundIndex((backgroundIndex + 1) % backgrounds.length); }; + const onPaletteClick = () => { + console.info("palette"); + }; const onUploadFile = async (file: File) => { const arrayBuffer = await file.arrayBuffer(); const romData = new Uint8Array(arrayBuffer); @@ -774,6 +777,13 @@ export const App: FC<AppProps> = ({ style={["simple", "border", "padded"]} onClick={onThemeClick} /> + <Button + text={"Palette"} + image={require("../res/brightness.svg")} + imageAlt="palette" + style={["simple", "border", "padded"]} + onClick={onPaletteClick} + /> <Button text={"Load ROM"} image={require("../res/upload.svg")} diff --git a/examples/web/res/brightness.svg b/examples/web/res/brightness.svg new file mode 100644 index 0000000000000000000000000000000000000000..537f362558d852ae668ab8d38281a6ef0acb79b2 --- /dev/null +++ b/examples/web/res/brightness.svg @@ -0,0 +1 @@ +<svg width="48px" height="48px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-labelledby="brightnessIconTitle" stroke="#ffffff" stroke-width="2" stroke-linecap="square" stroke-linejoin="miter" fill="none" color="#ffffff"> <title id="brightnessIconTitle">Brightness control</title> <path d="M15 6L12 3L9.00001 6H6.00001V9L3 12L6.00001 15V18H8.99999L12 21L15 18H18V15L21 12L18 9V6H15Z"/> <path d="M16 12C16 9.79086 14.2091 8 12 8V16C14.2091 16 16 14.2091 16 12Z"/> </svg> \ No newline at end of file diff --git a/examples/web/res/colours.svg b/examples/web/res/colours.svg new file mode 100644 index 0000000000000000000000000000000000000000..ca0cdebc20f38c94e6cc853cd5e5d9d6d439bd3f --- /dev/null +++ b/examples/web/res/colours.svg @@ -0,0 +1 @@ +<svg role="img" xmlns="http://www.w3.org/2000/svg" width="48px" height="48px" viewBox="0 0 24 24" aria-labelledby="coloursIconTitle" stroke="#ffffff" stroke-width="2" stroke-linecap="square" stroke-linejoin="miter" fill="none" color="#ffffff"> <title id="coloursIconTitle">Colours</title> <circle cx="12" cy="9" r="5"/> <circle cx="9" cy="14" r="5"/> <circle cx="15" cy="14" r="5"/> </svg> \ No newline at end of file