mirror of
https://github.com/whekin/household-bot.git
synced 2026-03-31 23:54:02 +00:00
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:
@@ -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
|
||||
}}
|
||||
/>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user