cleanup CSS a bit

This commit is contained in:
Joeri Exelmans 2025-05-28 11:24:37 +02:00
parent 955bb17f9a
commit dcd213102f
11 changed files with 113 additions and 79 deletions

View file

@ -1,5 +1,7 @@
import { useEffect, useRef, type ReactNode, type KeyboardEvent, useState } from "react";
import "./Input.css";
interface InputProps {
placeholder: string;
text: string;
@ -128,12 +130,11 @@ export function Input({placeholder, text, suggestion, onTextChange, onEnter, onC
}
};
return <span className="inputBlock">
{(focus === "yes") && children}
<span className="editable suggest">{text}{focus && suggestion}</span>
return <span className="textboxContainer">
<span className="textbox hint">{text}{focus && suggestion}</span>
<input ref={ref}
placeholder={placeholder}
className="editable"
className="textbox"
value={text}
onInput={(e) =>
// @ts-ignore
@ -143,5 +144,6 @@ export function Input({placeholder, text, suggestion, onTextChange, onEnter, onC
onBlur={() => setFocus("no")}
spellCheck={false}
/>
</span>;
{(focus === "yes") && children}
</span>;
}