mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-19 11:11:05 -05:00
feat: button v2 stories
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: { browser: true, es2020: true },
|
||||
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:react-hooks/recommended', 'plugin:storybook/recommended'],
|
||||
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:react-hooks/recommended', 'plugin:storybook/recommended', 'plugin:storybook/recommended'],
|
||||
ignorePatterns: ['dist', '.eslintrc.cjs'],
|
||||
parser: '@typescript-eslint/parser',
|
||||
plugins: ['react-refresh'],
|
||||
|
||||
@@ -25,11 +25,15 @@
|
||||
"@storybook/blocks": "^7.6.4",
|
||||
"@storybook/react": "^7.6.4",
|
||||
"@storybook/react-vite": "^7.6.4",
|
||||
"@storybook/test": "^7.6.5",
|
||||
"@storybook/testing-library": "^0.2.2",
|
||||
"@typescript-eslint/eslint-plugin": "^6.14.0",
|
||||
"@typescript-eslint/parser": "^6.14.0",
|
||||
"@vitejs/plugin-react": "^4.2.1",
|
||||
"esbuild": "^0.19.9",
|
||||
"eslint-plugin-storybook": "^0.6.15",
|
||||
"prop-types": "^15.8.1",
|
||||
"storybook": "^7.6.5",
|
||||
"tsup": "^8.0.1",
|
||||
"vite": "^5.0.8"
|
||||
}
|
||||
|
||||
6
apps/storybook/src/stories/button.stories.tsx
Normal file
6
apps/storybook/src/stories/button.stories.tsx
Normal file
@@ -0,0 +1,6 @@
|
||||
import buttonMeta, { PrimaryStory } from "@formbricks/ui/v2/Button/stories";
|
||||
|
||||
const meta = buttonMeta;
|
||||
export default meta;
|
||||
|
||||
export const Primary = PrimaryStory;
|
||||
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from "@storybook/react";
|
||||
|
||||
import { ButtonV2 } from "./index";
|
||||
|
||||
const meta = {
|
||||
const buttonMeta = {
|
||||
title: "Button",
|
||||
component: ButtonV2,
|
||||
tags: ["autodocs"],
|
||||
@@ -16,13 +16,13 @@ const meta = {
|
||||
},
|
||||
} satisfies Meta<typeof ButtonV2>;
|
||||
|
||||
export default meta;
|
||||
type Story = StoryObj<typeof meta>;
|
||||
export default buttonMeta;
|
||||
type Story = StoryObj<typeof buttonMeta>;
|
||||
|
||||
export const Primary: Story = {
|
||||
args: {
|
||||
className: "",
|
||||
children: "Button",
|
||||
variant: "secondary",
|
||||
variant: "primary",
|
||||
},
|
||||
};
|
||||
|
||||
1083
pnpm-lock.yaml
generated
1083
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user