mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
43 lines
967 B
TypeScript
43 lines
967 B
TypeScript
import React from "react";
|
|
import {ComponentStory, ComponentMeta} from "@storybook/react";
|
|
import {code} from "@nextui-org/theme";
|
|
|
|
import {Code, CodeProps} from "../src";
|
|
|
|
export default {
|
|
title: "Display/Code",
|
|
component: Code,
|
|
argTypes: {
|
|
color: {
|
|
control: {
|
|
type: "select",
|
|
options: ["neutral", "primary", "secondary", "success", "warning", "danger"],
|
|
},
|
|
},
|
|
radius: {
|
|
control: {
|
|
type: "select",
|
|
options: ["none", "base", "sm", "md", "lg", "xl", "full"],
|
|
},
|
|
},
|
|
size: {
|
|
control: {
|
|
type: "select",
|
|
options: ["xs", "sm", "md", "lg", "xl"],
|
|
},
|
|
},
|
|
},
|
|
} as ComponentMeta<typeof Code>;
|
|
|
|
const defaultProps = {
|
|
children: "npm install @nextui-org/react",
|
|
...code.defaultVariants,
|
|
};
|
|
|
|
const Template: ComponentStory<typeof Code> = (args: CodeProps) => <Code {...args} />;
|
|
|
|
export const Default = Template.bind({});
|
|
Default.args = {
|
|
...defaultProps,
|
|
};
|