cleanup CSS a bit
This commit is contained in:
parent
955bb17f9a
commit
dcd213102f
11 changed files with 113 additions and 79 deletions
|
|
@ -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>;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue