mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
* chore(deps): bump RA versions * chore(deps): bump RA versions * chore(deps): bump RA versions * chore: changeset * chore(deps): remove unnecessary dependencies * fix(calendar): typing issue * refactor(system): remove unused SupportedCalendars * refactor(system): move I18nProviderProps to type * refactor: use `spectrumCalendarProps<DateValue>["createCalendar"]` * feat: add consistent-type-imports * fix: eslint * chore: add changeset * refactor: remove unused deps
98 lines
1.8 KiB
TypeScript
98 lines
1.8 KiB
TypeScript
import type {Meta} from "@storybook/react";
|
|
|
|
import React from "react";
|
|
import {snippet} from "@heroui/theme";
|
|
|
|
import {Snippet} from "../src";
|
|
|
|
export default {
|
|
title: "Components/Snippet",
|
|
component: Snippet,
|
|
argTypes: {
|
|
variant: {
|
|
control: {
|
|
type: "select",
|
|
},
|
|
options: ["flat", "solid", "bordered", "shadow"],
|
|
},
|
|
color: {
|
|
control: {
|
|
type: "select",
|
|
},
|
|
options: ["default", "primary", "secondary", "success", "warning", "danger"],
|
|
},
|
|
radius: {
|
|
control: {
|
|
type: "select",
|
|
},
|
|
options: ["none", "sm", "md", "lg", "full"],
|
|
},
|
|
size: {
|
|
control: {
|
|
type: "select",
|
|
},
|
|
options: ["sm", "md", "lg"],
|
|
},
|
|
fullWidth: {
|
|
control: {
|
|
type: "boolean",
|
|
},
|
|
},
|
|
disableCopy: {
|
|
control: {
|
|
type: "boolean",
|
|
},
|
|
},
|
|
disableTooltip: {
|
|
control: {
|
|
type: "boolean",
|
|
},
|
|
},
|
|
hideCopyButton: {
|
|
control: {
|
|
type: "boolean",
|
|
},
|
|
},
|
|
hideSymbol: {
|
|
control: {
|
|
type: "boolean",
|
|
},
|
|
},
|
|
symbol: {
|
|
control: {
|
|
type: "text",
|
|
},
|
|
},
|
|
},
|
|
decorators: [
|
|
(Story) => (
|
|
<div className="flex items-center justify-center w-screen h-screen">
|
|
<Story />
|
|
</div>
|
|
),
|
|
],
|
|
} as Meta<typeof Snippet>;
|
|
|
|
const defaultProps = {
|
|
children: "npm install @heroui/react",
|
|
symbol: "$",
|
|
disableCopy: false,
|
|
disableTooltip: false,
|
|
hideCopyButton: false,
|
|
hideSymbol: false,
|
|
...snippet.defaultVariants,
|
|
};
|
|
|
|
export const Default = {
|
|
args: {
|
|
...defaultProps,
|
|
},
|
|
};
|
|
|
|
export const MultiLine = {
|
|
args: {
|
|
...defaultProps,
|
|
children: ["npm install @heroui/react", "yarn add @heroui/react", "pnpm add @heroui/react"],
|
|
},
|
|
};
|