feat(ContentEditable): add comments

This commit is contained in:
Ilia Mashkov
2026-01-30 17:44:18 +03:00
parent 8ef9226dd2
commit 42e1271647

View File

@@ -5,14 +5,20 @@
<script lang="ts"> <script lang="ts">
interface Props { interface Props {
/** /**
* Visible text * Visible text (bindable)
*/ */
text: string; text: string;
/** /**
* Font settings * Font size in pixels
*/ */
fontSize?: number; fontSize?: number;
/**
* Line height
*/
lineHeight?: number; lineHeight?: number;
/**
* Letter spacing in pixels
*/
letterSpacing?: number; letterSpacing?: number;
} }
@@ -53,7 +59,7 @@ function handleInput(e: Event) {
w-full min-h-[1.2em] outline-none transition-all duration-200 w-full min-h-[1.2em] outline-none transition-all duration-200
empty:before:content-[attr(data-placeholder)] empty:before:text-slate-400 empty:before:content-[attr(data-placeholder)] empty:before:text-slate-400
selection:bg-indigo-100 selection:text-indigo-900 selection:bg-indigo-100 selection:text-indigo-900
caret-indigo-500 caret-indigo-500 focus:outline-none
" "
style:font-size="{fontSize}px" style:font-size="{fontSize}px"
style:line-height={lineHeight} style:line-height={lineHeight}