mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
28 lines
676 B
TypeScript
28 lines
676 B
TypeScript
import { writable } from 'svelte/store';
|
|
import type { SvelteComponent } from 'svelte';
|
|
|
|
export type Tab = {
|
|
href: string;
|
|
title: string;
|
|
};
|
|
|
|
export type Breadcrumb = {
|
|
href: string;
|
|
title: string;
|
|
};
|
|
|
|
export type View = 'list' | 'grid';
|
|
|
|
export type updateLayoutArguments = {
|
|
header?: typeof SvelteComponent<unknown>;
|
|
breadcrumb?: typeof SvelteComponent<unknown>;
|
|
};
|
|
|
|
export const header = writable<typeof SvelteComponent<unknown>>();
|
|
export const breadcrumb = writable<typeof SvelteComponent<unknown>>();
|
|
|
|
export function updateLayout(args: updateLayoutArguments) {
|
|
header.set(args.header ?? null);
|
|
breadcrumb.set(args.breadcrumb ?? null);
|
|
}
|