use emoji instead of hide

This commit is contained in:
2024-01-12 16:50:34 +08:00
parent e097067d78
commit e7c5d9a8fd

View File

@@ -104,13 +104,15 @@ const Input = (props: {
return ( return (
<Help help={props.help}> <Help help={props.help}>
<label className="m-2 p-2">{props.field}</label> <label className="m-2 p-2">{props.field}</label>
<span <button
className="m-2 p-2" className="p-2"
onClick={(event: any) => setHideInput(!hideInput)} onClick={() => {
setHideInput(!hideInput);
console.log("clicked", hideInput);
}}
> >
<label>hide</label> {hideInput ? "👀" : "🙈"}
<input type="checkbox" checked={hideInput} /> </button>
</span>
<input <input
type={hideInput ? "password" : "text"} type={hideInput ? "password" : "text"}
className="m-2 p-2 border rounded focus w-32 md:w-fit" className="m-2 p-2 border rounded focus w-32 md:w-fit"