From 72c847d80f7ab92a4a49d1de7a7677c71267b173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Magalh=C3=A3es?= <joamag@gmail.com> Date: Sun, 11 Jun 2023 10:00:44 +0100 Subject: [PATCH] chore: added test input --- frontends/web/react/components/index.ts | 1 + .../components/test-section/test-section.css | 2 ++ .../components/test-section/test-section.tsx | 19 +++++++++++++++++++ frontends/web/ts/gb.ts | 7 ++++++- 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 frontends/web/react/components/test-section/test-section.css create mode 100644 frontends/web/react/components/test-section/test-section.tsx diff --git a/frontends/web/react/components/index.ts b/frontends/web/react/components/index.ts index 6ec9010a..88127a04 100644 --- a/frontends/web/react/components/index.ts +++ b/frontends/web/react/components/index.ts @@ -3,4 +3,5 @@ export * from "./debug/debug"; export * from "./help/help"; export * from "./registers-gb/registers-gb"; export * from "./serial-section/serial-section"; +export * from "./test-section/test-section"; export * from "./tiles-gb/tiles-gb"; diff --git a/frontends/web/react/components/test-section/test-section.css b/frontends/web/react/components/test-section/test-section.css new file mode 100644 index 00000000..c8479173 --- /dev/null +++ b/frontends/web/react/components/test-section/test-section.css @@ -0,0 +1,2 @@ +.test-section { +} diff --git a/frontends/web/react/components/test-section/test-section.tsx b/frontends/web/react/components/test-section/test-section.tsx new file mode 100644 index 00000000..a1db048c --- /dev/null +++ b/frontends/web/react/components/test-section/test-section.tsx @@ -0,0 +1,19 @@ +import React, { FC } from "react"; +import { TextInput } from "emukit"; + +import "./test-section.css"; + +type TestSectionProps = { + style?: string[]; +}; + +export const TestSection: FC<TestSectionProps> = ({ style = [] }) => { + const classes = () => ["test-section", ...style].join(" "); + return ( + <div className={classes()}> + <TextInput /> + </div> + ); +}; + +export default TestSection; diff --git a/frontends/web/ts/gb.ts b/frontends/web/ts/gb.ts index 6b733496..29cc5494 100644 --- a/frontends/web/ts/gb.ts +++ b/frontends/web/ts/gb.ts @@ -24,7 +24,8 @@ import { DebugGeneral, HelpFaqs, HelpKeyboard, - SerialSection + SerialSection, + TestSection } from "../react"; import { @@ -536,6 +537,10 @@ export class GameboyEmulator extends EmulatorBase implements Emulator { name: "Serial", icon: require("../res/serial.svg"), node: SerialSection({ emulator: this }) + }, + { + name: "Test", + node: TestSection({}) } ]; } -- GitLab