mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 19:33:11 +02:00
Portal: full mock-driven surfaces, demonolithed components, backend-ready mocks (#6686)
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import type { Meta, StoryObj } from "@storybook/react-vite";
|
||||
import { StatTile } from "@shared/components/StatTile";
|
||||
|
||||
const meta: Meta<typeof StatTile> = {
|
||||
title: "Primitives/StatTile",
|
||||
component: StatTile,
|
||||
tags: ["autodocs"],
|
||||
parameters: { layout: "padded" },
|
||||
args: { label: "Error rate", value: "0.4%", tone: "default" },
|
||||
argTypes: {
|
||||
tone: {
|
||||
control: "inline-radio",
|
||||
options: ["default", "success", "warning", "danger"],
|
||||
},
|
||||
},
|
||||
};
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof StatTile>;
|
||||
|
||||
export const Playground: Story = {};
|
||||
|
||||
export const ToneRow: Story = {
|
||||
render: () => (
|
||||
<div style={{ display: "flex", gap: 32 }}>
|
||||
<StatTile label="Uptime" value="99.98%" tone="success" />
|
||||
<StatTile label="Error rate" value="1.4%" tone="warning" />
|
||||
<StatTile label="Error rate" value="6.2%" tone="danger" />
|
||||
<StatTile label="P95 latency" value="412 ms" />
|
||||
</div>
|
||||
),
|
||||
};
|
||||
Reference in New Issue
Block a user