1
Fork 0
mirror of https://github.com/Steffo99/festa.git synced 2024-10-16 15:07:27 +00:00

Remove prefix and suffix from EditableText

It was ugly, since text changed position when a prefix was added
This commit is contained in:
Steffo 2022-07-18 06:13:05 +02:00
parent 8258f8185f
commit 8e5e3aacaa
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -5,7 +5,7 @@ import { EditingModeBranch } from "./base"
import style from "./inputs.module.css"
type TextInputProps = ComponentPropsWithoutRef<"input"> & { value: string, viewPrefix?: ReactNode, viewSuffix?: ReactNode }
type TextInputProps = ComponentPropsWithoutRef<"input"> & { value: string }
type FileInputProps = ComponentPropsWithoutRef<"input"> & { value?: undefined }
type TextAreaProps = ComponentPropsWithoutRef<"textarea"> & { value: string }
@ -21,7 +21,7 @@ export const EditableText = (props: TextInputProps) => {
}
view={
<div className={style.editableTextView}>
{props.viewPrefix}{props.value}{props.viewSuffix}
{props.value}
</div>
}
/>