-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6c7dfc6
commit 45e799c
Showing
19 changed files
with
13,222 additions
and
32,997 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
/** @type {import('@types/eslint').Linter.BaseConfig} */ | ||
module.exports = { | ||
extends: [ | ||
"@remix-run/eslint-config", | ||
"@remix-run/eslint-config/node", | ||
"@remix-run/eslint-config/jest-testing-library", | ||
"prettier", | ||
], | ||
extends: ["@remix-run/eslint-config", "@remix-run/eslint-config/node", "@remix-run/eslint-config/jest-testing-library", "prettier", "plugin:storybook/recommended", "plugin:storybook/recommended"], | ||
env: { | ||
"cypress/globals": true, | ||
"cypress/globals": true | ||
}, | ||
plugins: ["cypress"], | ||
// We're using vitest which has a very similar API to jest | ||
// (so the linting plugins work nicely), but we have to | ||
// set the jest version explicitly. | ||
settings: { | ||
jest: { | ||
version: 28, | ||
}, | ||
}, | ||
}; | ||
version: 28 | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import type { StorybookConfig } from "@storybook/react-vite"; | ||
const config: StorybookConfig = { | ||
stories: [ | ||
"../stories/**/*.mdx", | ||
"../stories/**/*.stories.@(js|jsx|ts|tsx)", | ||
"../app/components/**/*.stories.@(jsx|tsx)", | ||
], | ||
addons: [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@storybook/addon-interactions", | ||
{ | ||
name: "@storybook/addon-styling", | ||
options: { | ||
postCss: true, | ||
}, | ||
}, | ||
], | ||
framework: { | ||
name: "@storybook/react-vite", | ||
options: {}, | ||
}, | ||
docs: { | ||
autodocs: "tag", | ||
}, | ||
}; | ||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import type { Preview } from "@storybook/react"; | ||
import '../app/styles/tailwind.css'; | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export default preview; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { unstable_createRemixStub as createRemixStub } from "@remix-run/testing"; | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
import TextInput from "./TextInput"; | ||
|
||
const meta: Meta<typeof TextInput> = { | ||
title: "components/UI/TextInput", | ||
component: TextInput, | ||
decorators: [ | ||
(Story) => { | ||
const RemixStub = createRemixStub([ | ||
{ | ||
path: "/", | ||
element: <Story />, | ||
}, | ||
]); | ||
return <RemixStub />; | ||
}, | ||
], | ||
tags: ["autodocs"], | ||
args: { | ||
name: "email", | ||
labelName: "Email", | ||
type: "email", | ||
emoji: "📧", | ||
}, | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Primary: Story = {}; | ||
|
||
export const Error: Story = { | ||
args: { | ||
name: "email", | ||
labelName: "Email", | ||
type: "email", | ||
error: | ||
"That email is already taken. Please choose another or browse to the login page.", | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.