mirror of
https://github.com/Steffo99/festa.git
synced 2024-12-22 22:54:22 +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:
parent
8258f8185f
commit
8e5e3aacaa
1 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@ import { EditingModeBranch } from "./base"
|
||||||
import style from "./inputs.module.css"
|
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 FileInputProps = ComponentPropsWithoutRef<"input"> & { value?: undefined }
|
||||||
type TextAreaProps = ComponentPropsWithoutRef<"textarea"> & { value: string }
|
type TextAreaProps = ComponentPropsWithoutRef<"textarea"> & { value: string }
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ export const EditableText = (props: TextInputProps) => {
|
||||||
}
|
}
|
||||||
view={
|
view={
|
||||||
<div className={style.editableTextView}>
|
<div className={style.editableTextView}>
|
||||||
{props.viewPrefix}{props.value}{props.viewSuffix}
|
{props.value}
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in a new issue