From 38b91d30706d9fd06639c418f8cea4f3830f7bf8 Mon Sep 17 00:00:00 2001 From: ernzher Date: Thu, 30 Nov 2023 01:48:23 +0000 Subject: [PATCH 1/4] Edit: textInput tailwind version --- src/Viewer/renderers/textInput.jsx | 57 +++++------------------------- 1 file changed, 9 insertions(+), 48 deletions(-) diff --git a/src/Viewer/renderers/textInput.jsx b/src/Viewer/renderers/textInput.jsx index 22668c00..2bd63768 100644 --- a/src/Viewer/renderers/textInput.jsx +++ b/src/Viewer/renderers/textInput.jsx @@ -16,6 +16,7 @@ import { MathJax } from "better-react-mathjax"; import { BoardContext } from "./graph"; import me from "math-expressions"; import { getPositionFromAnchorByCoordinate } from "../../Core/utils/graphical"; +import { Label, TextInput as Input, Textarea } from 'flowbite-react'; // Moved most of checkWorkStyle styling into Button const Button = styled.button` @@ -37,35 +38,6 @@ const Button = styled.button` } `; -const TextArea = styled.textarea` - width: ${(props) => props.width}; - height: ${(props) => - props.height}; // Same height as the checkWorkButton, accounting for the borders - font-size: 14px; - border: ${(props) => - props.disabled ? "2px solid var(--mainGray)" : "var(--mainBorder)"}; - cursor: ${(props) => (props.disabled ? "not-allowed" : "auto")}; - - &:focus { - outline: var(--mainBorder); - outline-offset: 2px; - } -`; - -const Input = styled.input` - width: ${(props) => props.width}; - height: 20px; // Same height as the checkWorkButton, accounting for the borders - font-size: 14px; - border: ${(props) => - props.disabled ? "2px solid var(--mainGray)" : "var(--mainBorder)"}; - cursor: ${(props) => (props.disabled ? "not-allowed" : "auto")}; - - &:focus { - outline: var(--mainBorder); - outline-offset: 2px; - } -`; - export default function TextInput(props) { let { name, @@ -711,50 +683,39 @@ export default function TextInput(props) { } if (SVs.expanded) { input = ( -