misc: add community language warning, close #483
This commit is contained in:
4 files changed
+35
-8
No files matched your search
@@ -1,20 +1,22 @@
|
||||
<script lang="ts">
|
||||
import type { ClassValue } from 'svelte/elements'
|
||||
import { Material } from '../index.js'
|
||||
import { Icon, InformationCircle } from 'svelte-hero-icons'
|
||||
|
||||
interface Props {
|
||||
content?: string | undefined
|
||||
children?: import('svelte').Snippet
|
||||
class?: ClassValue
|
||||
}
|
||||
|
||||
let { content = undefined, children }: Props = $props()
|
||||
let { content = undefined, children, class: clazz = '' }: Props = $props()
|
||||
</script>
|
||||
|
||||
<Material
|
||||
padding="none"
|
||||
rounding="full"
|
||||
color="uniform"
|
||||
class="flex flex-row space-x-2 items-center px-4 py-3"
|
||||
class="flex flex-row space-x-2 items-center px-4 py-3 {clazz}"
|
||||
>
|
||||
<Icon
|
||||
src={InformationCircle}
|
||||
@@ -22,11 +24,13 @@
|
||||
mini
|
||||
class="text-primary-900 dark:text-primary-100"
|
||||
/>
|
||||
<p>
|
||||
<div class="flex items-center w-full">
|
||||
{#if children}
|
||||
{@render children?.()}
|
||||
{:else if content}
|
||||
{content}
|
||||
<p>
|
||||
{content}
|
||||
</p>
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
</Material>
|
||||
@@ -36,7 +36,7 @@
|
||||
{...rest}
|
||||
{color}
|
||||
rounding="none"
|
||||
class="w-full px-2 rounded-lg min-h-8 font-medium {disabled
|
||||
class="w-full px-2 rounded-lg min-h-8 font-normal {disabled
|
||||
? 'opacity-70 pointer-events-none cursor-not-allowed'
|
||||
: ''} {color == 'tertiary'
|
||||
? 'hover:dark:bg-zinc-800/70'
|
||||
|
||||
Reference in new issue
Block a user