Files
gpx.studio/website/src/lib/components/docs/DocsNote.svelte

23 lines
497 B
Svelte
Raw Normal View History

2024-07-09 17:49:18 +02:00
<script lang="ts">
2025-06-21 21:07:36 +02:00
import type { Snippet } from 'svelte';
let { type = 'note', children }: { type?: 'note' | 'warning'; children: Snippet } = $props();
2024-07-09 17:49:18 +02:00
</script>
2024-07-09 22:15:05 +02:00
<div
class="bg-secondary border-l-8 {type === 'note'
? 'border-link'
: 'border-destructive'} p-2 text-sm rounded-md"
2024-07-09 22:15:05 +02:00
>
2025-06-21 21:07:36 +02:00
{@render children()}
2024-07-09 17:49:18 +02:00
</div>
2024-07-12 18:08:27 +02:00
<style lang="postcss">
2025-06-21 21:07:36 +02:00
@reference "../../../app.css";
div :global(a) {
@apply text-link;
@apply hover:underline;
}
2024-07-12 18:08:27 +02:00
</style>