Enhance Mihomo overview charts component with improved theming and chart management
- Integrated dynamic theming for chart colors using a centralized theme file, enhancing visual consistency across charts. - Refactored chart initialization logic to ensure proper destruction and recreation of charts on data updates, improving performance and responsiveness. - Updated chart options to utilize theme colors for grid, ticks, and legends, providing a more cohesive user experience.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<script lang="ts">
|
||||
import { cn } from '$lib/utils.js';
|
||||
import type { Snippet } from 'svelte';
|
||||
|
||||
let {
|
||||
class: className,
|
||||
children
|
||||
}: {
|
||||
class?: string;
|
||||
children: Snippet;
|
||||
} = $props();
|
||||
</script>
|
||||
|
||||
<div
|
||||
class={cn(
|
||||
'flex flex-wrap items-center justify-between gap-2 border-b border-border bg-muted/30 px-3 py-2',
|
||||
className
|
||||
)}
|
||||
>
|
||||
{@render children()}
|
||||
</div>
|
||||
Reference in New Issue
Block a user