feat(ContentEditable): add comments
This commit is contained in:
@@ -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}
|
||||||
|
|||||||
Reference in New Issue
Block a user