initial commit
This commit is contained in:
15
src/lib/components/ui/Code.svelte
Normal file
15
src/lib/components/ui/Code.svelte
Normal file
@@ -0,0 +1,15 @@
|
||||
<script lang="ts">
|
||||
interface Props {
|
||||
value: string
|
||||
variant?: 'default' | 'blue'
|
||||
}
|
||||
|
||||
let { value, variant = 'default' }: Props = $props()
|
||||
|
||||
const variantClasses = {
|
||||
default: 'bg-gray-100',
|
||||
blue: 'bg-blue-50 text-blue-700',
|
||||
}
|
||||
</script>
|
||||
|
||||
<code class="rounded px-2 py-1 font-mono text-xs {variantClasses[variant]}">{value}</code>
|
||||
Reference in New Issue
Block a user