mirror of
https://github.com/thiloho/archtika.git
synced 2025-12-24 07:23:35 +01:00
Share styles and update props
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
const { date } = $props<{ date: string }>();
|
||||
const { date }: { date: string } = $props();
|
||||
|
||||
const options: Intl.DateTimeFormatOptions = {
|
||||
year: "numeric",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import type { Snippet } from "svelte";
|
||||
|
||||
const { children, id, text } = $props<{ children: Snippet; id: string; text: string }>();
|
||||
const { children, id, text }: { children: Snippet; id: string; text: string } = $props();
|
||||
</script>
|
||||
|
||||
<a href={`#${id}`} role="button">{text}</a>
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
<script lang="ts">
|
||||
const { success, message } = $props<{
|
||||
success: boolean | undefined;
|
||||
message: string;
|
||||
}>();
|
||||
const { success, message }: { success: boolean | undefined; message: string | undefined } =
|
||||
$props();
|
||||
</script>
|
||||
|
||||
{#if success}
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
fullPreview = false,
|
||||
previewContent,
|
||||
previewScrollTop = 0
|
||||
} = $props<{
|
||||
}: {
|
||||
id: string;
|
||||
title: string;
|
||||
children: Snippet;
|
||||
fullPreview?: boolean;
|
||||
previewContent: string;
|
||||
previewScrollTop?: number;
|
||||
}>();
|
||||
} = $props();
|
||||
|
||||
let previewElement: HTMLDivElement;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user