From 72d8b4e6bee0ffac79e96dd649a9da2adb86b507 Mon Sep 17 00:00:00 2001 From: name Date: Wed, 27 Sep 2023 11:34:23 +0000 Subject: 2023-09-26 --- docusaurus/src/components/ButtonLink.tsx | 35 +++++++++++++------------ docusaurus/src/components/FormCTA.tsx | 27 +++++++++---------- docusaurus/src/components/FormQuickStart.tsx | 35 ------------------------- docusaurus/src/components/InputMathProblems.tsx | 26 +++++++++--------- docusaurus/src/components/ShowStepButton.tsx | 25 ------------------ docusaurus/src/components/SubmitButton.tsx | 22 ++++++++++++++++ 6 files changed, 65 insertions(+), 105 deletions(-) delete mode 100644 docusaurus/src/components/FormQuickStart.tsx delete mode 100644 docusaurus/src/components/ShowStepButton.tsx create mode 100644 docusaurus/src/components/SubmitButton.tsx (limited to 'docusaurus/src/components') diff --git a/docusaurus/src/components/ButtonLink.tsx b/docusaurus/src/components/ButtonLink.tsx index 12fc559..5fd69e1 100644 --- a/docusaurus/src/components/ButtonLink.tsx +++ b/docusaurus/src/components/ButtonLink.tsx @@ -1,25 +1,26 @@ -/** - * @license - * SPDX-License-Identifier: AGPL-3.0-or-later - * This file is part of Wolfree. - * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - */ +/* SPDX-License-Identifier: AGPL-3.0-or-later */ -import React from "react"; +import Button from "@mui/material/Button"; import Link from "@docusaurus/Link"; -import { Button } from "@mui/material"; +import React from "react"; -const ButtonLink = ({ to = String(), text = String() }) => ( - - - +export default ({ + to = "", + text = "", +}: Readonly<{ + to: string; + text: string; +}>): React.JSX.Element => ( +

+ + + +

); -export default ButtonLink; - // Typography - MUI System // https://mui.com/system/typography/ diff --git a/docusaurus/src/components/FormCTA.tsx b/docusaurus/src/components/FormCTA.tsx index 1b5a81e..0912dec 100644 --- a/docusaurus/src/components/FormCTA.tsx +++ b/docusaurus/src/components/FormCTA.tsx @@ -1,23 +1,20 @@ -/** - * @license - * SPDX-License-Identifier: AGPL-3.0-or-later - * This file is part of Wolfree. - * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - */ +/* SPDX-License-Identifier: AGPL-3.0-or-later */ +import InputMathProblems from "./InputMathProblems"; import React from "react"; +import SubmitButton from "./SubmitButton"; import submitMathInputForm from "../functions/submitMathInputForm"; -import InputMathProblems from "./InputMathProblems"; -import ShowStepButton from "./ShowStepButton"; -const FormCTA = ({ autoFocus = Boolean() }) => ( +export default ({ + autoFocus = false, + submitText = "", +}: Readonly<{ + autoFocus: boolean; + submitText: string; +}>): React.JSX.Element => (
+

- -

- -

+ ); - -export default FormCTA; diff --git a/docusaurus/src/components/FormQuickStart.tsx b/docusaurus/src/components/FormQuickStart.tsx deleted file mode 100644 index 60589fb..0000000 --- a/docusaurus/src/components/FormQuickStart.tsx +++ /dev/null @@ -1,35 +0,0 @@ -/** - * @license - * SPDX-License-Identifier: AGPL-3.0-or-later - * This file is part of Wolfree. - * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - */ - -import React from "react"; -import submitMathInputForm from "../functions/submitMathInputForm"; -import InputMathProblems from "./InputMathProblems"; -import ShowStepButton from "./ShowStepButton"; - -const FormQuickStart = () => ( -
-
    -
  1. -

    Type your math problem in the text box.

    - -
  2. -
  3. -

    - Click the "Show Steps" button. -

    - -
  4. -
  5. -

    - Explore the step-by-step solution provided. 🎉 -

    -
  6. -
-
-); - -export default FormQuickStart; diff --git a/docusaurus/src/components/InputMathProblems.tsx b/docusaurus/src/components/InputMathProblems.tsx index c7b49ce..27313d2 100644 --- a/docusaurus/src/components/InputMathProblems.tsx +++ b/docusaurus/src/components/InputMathProblems.tsx @@ -1,19 +1,15 @@ -/** - * @license - * SPDX-License-Identifier: AGPL-3.0-or-later - * This file is part of Wolfree. - * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - */ +/* SPDX-License-Identifier: AGPL-3.0-or-later */ import React from "react"; import TextField from "@mui/material/TextField"; -// TextField API - Material UI -// https://mui.com/material-ui/api/text-field/ -const InputMathProblems = ({ - autoFocus = Boolean(), - defaultValue = String(), -}) => ( +export default ({ + autoFocus = false, + defaultValue = "", +}: Readonly<{ + autoFocus: boolean; + defaultValue: string; +}>): React.JSX.Element => ( ); -export default InputMathProblems; +// TextField API - Material UI +// https://mui.com/material-ui/api/text-field/ + +// : The Input (Form Input) element - HTML: HyperText Markup Language | MDN +// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input diff --git a/docusaurus/src/components/ShowStepButton.tsx b/docusaurus/src/components/ShowStepButton.tsx deleted file mode 100644 index 3ae7ba3..0000000 --- a/docusaurus/src/components/ShowStepButton.tsx +++ /dev/null @@ -1,25 +0,0 @@ -/** - * @license - * SPDX-License-Identifier: AGPL-3.0-or-later - * This file is part of Wolfree. - * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - */ - -import React from "react"; -import { Button } from "@mui/material"; - -const ShowStepButton = () => ( - -); - -export default ShowStepButton; - -// Typography - MUI System -// https://mui.com/system/typography/ diff --git a/docusaurus/src/components/SubmitButton.tsx b/docusaurus/src/components/SubmitButton.tsx new file mode 100644 index 0000000..e9b1c72 --- /dev/null +++ b/docusaurus/src/components/SubmitButton.tsx @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: AGPL-3.0-or-later */ + +import Button from "@mui/material/Button"; +import React from "react"; + +export default ({ + text = "", +}: Readonly<{ text: string }>): React.JSX.Element => ( +

+ +

+); + +// Typography - MUI System +// https://mui.com/system/typography/ -- cgit v1.2.3