// A scratchpad of the "non-happy" states for a list or page — loading, empty, // error, and skeleton. Each option is a real @mantine/core composition so the one // you pick drops straight into your app as a component variation. Open the Design // tab → Scratchpad to compare them on the canvas. import { Alert, Button, Center, Group, Loader, Paper, Skeleton, Stack, Text, ThemeIcon } from '@mantine/core' export const title = 'Empty & loading states' export const objects = [ { name: 'Loading', mantine: ['Loader', 'Stack'], render: () => ( Loading your items… ), }, { name: 'Empty', mantine: ['ThemeIcon', 'Stack', 'Button'], render: () => ( No items yet Create your first item to get started. ), }, { name: 'Error', mantine: ['Alert', 'Button'], render: () => ( Something went wrong fetching your items. ), }, { name: 'Skeleton list', mantine: ['Skeleton', 'Group'], render: () => ( {[0, 1, 2].map((i) => ( ))} ), }, { name: 'Inline empty', mantine: ['Paper', 'Center'], render: () => (
Nothing here yet — drop something in.
), }, ]