feat: add skeleton loading states for initial data load

- Add loading signal to DashboardContext
- Update Skeleton component to accept style prop
- Add skeleton UI to HomeRoute, LedgerRoute, and BalancesRoute
- Use Switch/Match pattern for three-state handling (loading/empty/content)
This commit is contained in:
2026-03-14 11:08:35 +04:00
parent 9cac339d0a
commit 62d62091a3
5 changed files with 919 additions and 832 deletions

View File

@@ -1,9 +1,11 @@
import { JSX } from 'solid-js'
import { cn } from '../../lib/cn'
type SkeletonProps = {
class?: string
width?: string
height?: string
style?: JSX.CSSProperties
}
export function Skeleton(props: SkeletonProps) {
@@ -12,7 +14,8 @@ export function Skeleton(props: SkeletonProps) {
class={cn('ui-skeleton', props.class)}
style={{
width: props.width,
height: props.height
height: props.height,
...props.style
}}
/>
)