-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Expand file tree
/
Copy pathnumbers.stories.tsx
More file actions
61 lines (51 loc) · 1.92 KB
/
numbers.stories.tsx
File metadata and controls
61 lines (51 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
* Copyright 2026 Element Creations Ltd.
*
* SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
* Please see LICENSE files in the repository root for full details.
*/
import React from "react";
import { Markdown } from "@storybook/addon-docs/blocks";
import type { Meta } from "@storybook/react-vite";
import clampDoc from "../../../typedoc/functions/clamp.md?raw";
import defaultNumberDoc from "../../../typedoc/functions/defaultNumber.md?raw";
import percentageOfDoc from "../../../typedoc/functions/percentageOf.md?raw";
import percentageWithinDoc from "../../../typedoc/functions/percentageWithin.md?raw";
import sumDoc from "../../../typedoc/functions/sum.md?raw";
const meta = {
title: "Core/Numbers",
parameters: {
docs: {
page: () => (
<>
<h1>Number Utilities</h1>
<p>
A collection of utility functions for working with numbers, including validation, clamping, and
percentage calculations.
</p>
<hr />
<h2>defaultNumber</h2>
<Markdown>{defaultNumberDoc}</Markdown>
<hr />
<h2>clamp</h2>
<Markdown>{clampDoc}</Markdown>
<hr />
<h2>sum</h2>
<Markdown>{sumDoc}</Markdown>
<hr />
<h2>percentageWithin</h2>
<Markdown>{percentageWithinDoc}</Markdown>
<hr />
<h2>percentageOf</h2>
<Markdown>{percentageOfDoc}</Markdown>
</>
),
},
},
tags: ["autodocs", "skip-test"],
} satisfies Meta;
export default meta;
// Docs-only story - renders nothing but triggers autodocs
export const Docs = {
render: () => null,
};