mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-06 19:18:22 +01:00
2e91ee843c
Less hasn't received an update in over a year and the parser is missing some modern syntax like relative colors so this switches us to scss
59 lines
1.4 KiB
TypeScript
59 lines
1.4 KiB
TypeScript
// Copyright 2024, Command Line Inc.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
import { UserList } from "./userlist";
|
|
|
|
import "./userlist.scss";
|
|
|
|
export interface UserStatus {
|
|
text: string;
|
|
status: "online" | "busy" | "away" | "offline";
|
|
onClick: () => void;
|
|
}
|
|
|
|
const meta = {
|
|
title: "Elements/UserList",
|
|
component: UserList,
|
|
args: {
|
|
users: [
|
|
{
|
|
label: "John Doe",
|
|
status: "online",
|
|
onClick: () => console.log("John Doe clicked"),
|
|
},
|
|
{
|
|
label: "Jane Smith",
|
|
status: "busy",
|
|
onClick: () => console.log("Jane Smith clicked"),
|
|
},
|
|
{
|
|
label: "Robert Brown",
|
|
status: "away",
|
|
onClick: () => console.log("Robert Brown clicked"),
|
|
},
|
|
{
|
|
label: "Alice Lambert",
|
|
status: "offline",
|
|
onClick: () => console.log("Alice Lambert clicked"),
|
|
},
|
|
],
|
|
},
|
|
argTypes: {
|
|
users: {
|
|
description: "Array of user statuses to be displayed",
|
|
},
|
|
},
|
|
} satisfies Meta<typeof UserList>;
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof meta>;
|
|
|
|
export const Default: Story = {
|
|
render: (args) => (
|
|
<div>
|
|
<UserList {...args} />
|
|
</div>
|
|
),
|
|
};
|