prep: replace $$props.class with props
This commit is contained in:
1 parent
3ca72662ca
commit
0718c8e0c6
69 files changed
+383
-214
No files matched your search
@@ -16,6 +16,8 @@
|
||||
textarea.style.height = `${textarea.scrollHeight}px` // Set height to the scrollHeight
|
||||
}
|
||||
}
|
||||
let clazz: string = ''
|
||||
export { clazz as class }
|
||||
</script>
|
||||
|
||||
<label class="w-full">
|
||||
@@ -34,6 +36,6 @@
|
||||
{required}
|
||||
{...$$restProps}
|
||||
rows={1}
|
||||
class="font-semibold text-2xl focus:outline-none w-full bg-transparent resize-none {$$props.class}"
|
||||
class="font-semibold text-2xl focus:outline-none w-full bg-transparent resize-none {clazz}"
|
||||
/>
|
||||
</label>
|
||||
@@ -14,6 +14,9 @@
|
||||
export let nowrap: boolean = false
|
||||
|
||||
$: richURL = $$slots.default ? undefined : parseURL(href)
|
||||
|
||||
let clazz: string = ''
|
||||
export { clazz as class }
|
||||
</script>
|
||||
|
||||
<a
|
||||
@@ -21,14 +24,14 @@
|
||||
{href}
|
||||
class="{highlight
|
||||
? 'text-blue-500'
|
||||
: ''} hover:underline max-w-full inline-flex items-center gap-1 {$$props.class}"
|
||||
: ''} hover:underline max-w-full inline-flex items-center gap-1 {clazz}"
|
||||
>
|
||||
<slot name="icon" />
|
||||
<slot>
|
||||
<span
|
||||
class="flex relative gap-0 {nowrap
|
||||
? 'w-full whitespace-nowrap overflow-hidden text-ellipsis text-xs'
|
||||
: ''} {$$props.class}"
|
||||
: ''} {clazz}"
|
||||
>
|
||||
{#if richURL}
|
||||
<span class="text-blue-300 dark:text-blue-800">
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
export let selected: T
|
||||
export let headless: boolean = false
|
||||
|
||||
let clazz: string = ''
|
||||
export let buttonClazz: string = ''
|
||||
export { clazz as class }
|
||||
|
||||
const dispatcher = createEventDispatcher<{ select: T }>()
|
||||
|
||||
$: {
|
||||
@@ -19,7 +23,7 @@
|
||||
let containerClass = `
|
||||
flex flex-row rtl:flex-row-reverse items-center w-max max-w-full overflow-auto
|
||||
${headless ? 'pb-1 gap-1' : ''}
|
||||
${$$props.class}
|
||||
${clazz}
|
||||
`
|
||||
|
||||
const buttonClass = (selected: boolean) => `
|
||||
@@ -27,7 +31,7 @@
|
||||
last:rounded-r-lg last:border-r last:dark:border-r-transparent
|
||||
rounded-l-none
|
||||
rounded-r-none
|
||||
px-3 py-1.5 text-sm hover:brightness-110 ${$$props.buttonClass || ''}
|
||||
px-3 py-1.5 text-sm hover:brightness-110 ${buttonClazz || ''}
|
||||
${
|
||||
!selected
|
||||
? `hover:dark:bg-zinc-800 border-slate-100 border-t border-b border-b-slate-300 dark:border-b-0
|
||||
|
||||
Reference in new issue
Block a user