Fix placeholder
This commit is contained in:
parent
360bb1d714
commit
42d88394c7
|
|
@ -10,7 +10,7 @@
|
|||
border: none;
|
||||
}
|
||||
|
||||
.root:empty::before {
|
||||
.root::before {
|
||||
content: attr(data-placeholder);
|
||||
color: var(--text-muted);
|
||||
font-style: italic;
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ export const ContentEditable = ({ value, placeholder, autoLines, onInput, class:
|
|||
contentEditable
|
||||
onKeyDown={handleKeyDown}
|
||||
onInput={handleInput}
|
||||
data-placeholder={placeholder}
|
||||
data-placeholder={value.replaceAll('\n', '').length ? undefined : placeholder}
|
||||
class={clsx(styles.root, autoLines && styles.autoLines, externalClass)}
|
||||
{...props}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Reference in New Issue