Track HiveGrid Cloud planning reference
This commit is contained in:
1 parent
b3d5ea6764
commit
e341c5938a
5784 files changed
+1104929
-3
No files matched your search
@@ -0,0 +1,45 @@
|
||||
import type { Meta, StoryObj } from "@storybook/react";
|
||||
import { DemoField, DemoSelect } from "./_demo-primitives.js";
|
||||
|
||||
const meta: Meta<typeof DemoSelect> = {
|
||||
title: "UI / Inputs / Select",
|
||||
component: DemoSelect,
|
||||
tags: ["autodocs"],
|
||||
};
|
||||
|
||||
export default meta;
|
||||
|
||||
type Story = StoryObj<typeof DemoSelect>;
|
||||
|
||||
const roleOptions = [
|
||||
{ value: "viewer", label: "Viewer" },
|
||||
{ value: "editor", label: "Editor" },
|
||||
{ value: "admin", label: "Admin" },
|
||||
];
|
||||
|
||||
export const Single: Story = {
|
||||
args: { options: roleOptions, defaultValue: "viewer" },
|
||||
render: (args) => (
|
||||
<DemoField label="Role" htmlFor="role-single">
|
||||
<DemoSelect id="role-single" {...args} />
|
||||
</DemoField>
|
||||
),
|
||||
};
|
||||
|
||||
export const Multi: Story = {
|
||||
args: { options: roleOptions, multiple: true, size: 3 },
|
||||
render: (args) => (
|
||||
<DemoField label="Roles" htmlFor="role-multi" hint="Hold ⌘/Ctrl to select multiple.">
|
||||
<DemoSelect id="role-multi" {...args} />
|
||||
</DemoField>
|
||||
),
|
||||
};
|
||||
|
||||
export const Disabled: Story = {
|
||||
args: { options: roleOptions, disabled: true, defaultValue: "admin" },
|
||||
render: (args) => (
|
||||
<DemoField label="Role" htmlFor="role-disabled">
|
||||
<DemoSelect id="role-disabled" {...args} />
|
||||
</DemoField>
|
||||
),
|
||||
};
|
||||
Reference in new issue
Block a user