1
Fork 0
mirror of https://github.com/Steffo99/festa.git synced 2025-01-03 12:34:20 +00:00

Make the padding of EditableText consistent in all EditingModes

This commit is contained in:
Steffo 2022-07-16 18:04:03 +02:00
parent eaa378d23e
commit 8a6c363de4
Signed by: steffo
GPG key ID: 6965406171929D01
2 changed files with 10 additions and 1 deletions

View file

@ -0,0 +1,6 @@
.editableTextView {
/* Match the padding of the edit input
* 8px padding + 2px border
*/
padding: 10px;
}

View file

@ -2,6 +2,7 @@ import { ComponentPropsWithoutRef } from "react"
import { FestaMoment } from "../renderers/datetime"
import { FestaMarkdownRenderer } from "../renderers/markdown"
import { EditingModeBranch } from "./base"
import style from "./inputs.module.css"
type TextInputProps = ComponentPropsWithoutRef<"input"> & { value: string }
@ -19,7 +20,9 @@ export const EditableText = (props: TextInputProps) => {
<input type="text" {...props} />
}
view={
<div>{props.value}</div>
<div className={style.editableTextView}>
{props.value}
</div>
}
/>
)