Skip to content

Commit

Permalink
update config files to ES5 for compatibility with storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
benorloff committed Apr 19, 2024
1 parent 73c4724 commit aa6341a
Show file tree
Hide file tree
Showing 23 changed files with 87 additions and 466 deletions.
1 change: 0 additions & 1 deletion .storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@ const config: StorybookConfig = {
docs: {
autodocs: "tag",
},
staticDirs: ["../public"],
};
export default config;
16 changes: 8 additions & 8 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ const preview: Preview = {
},
},

decorators: [withThemeByClassName({
themes: {
// nameOfTheme: 'classNameForTheme',
light: '',
dark: 'dark',
},
defaultTheme: 'light',
})]
// decorators: [withThemeByClassName({
// themes: {
// // nameOfTheme: 'classNameForTheme',
// light: '',
// dark: 'dark',
// },
// defaultTheme: 'light',
// })]
};

export default preview;
2 changes: 1 addition & 1 deletion .storybook/tokens/color.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react"
import type { Meta, StoryObj } from "@storybook/react"
import resolveConfig from "tailwindcss/resolveConfig"

import config from "../../tailwind.config.ts"
import config from "../../tailwind.config.cjs"
import { hexToHSL, hslToHex } from "./util"

const meta: Meta<{
Expand Down
2 changes: 1 addition & 1 deletion .storybook/tokens/radius.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react"
import type { Meta, StoryObj } from "@storybook/react"
import resolveConfig from "tailwindcss/resolveConfig"

import config from "../../tailwind.config.ts"
import config from "../../tailwind.config.cjs"

const fullConfig = resolveConfig(config)

Expand Down
2 changes: 1 addition & 1 deletion .storybook/tokens/shadow.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react"
import type { Meta, StoryObj } from "@storybook/react"
import resolveConfig from "tailwindcss/resolveConfig"

import config from "../../tailwind.config.ts"
import config from "../../tailwind.config.cjs"

const fullConfig = resolveConfig(config)

Expand Down
2 changes: 1 addition & 1 deletion .storybook/tokens/spacing.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react"
import type { Meta, StoryObj } from "@storybook/react"
import resolveConfig from "tailwindcss/resolveConfig"

import config from "../../tailwind.config.ts"
import config from "../../tailwind.config.cjs"

const fullConfig = resolveConfig(config)

Expand Down
2 changes: 1 addition & 1 deletion .storybook/tokens/typography.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { CSSProperties } from "react"
import type { Meta, StoryObj } from "@storybook/react"
import resolveConfig from "tailwindcss/resolveConfig"

import config from "../../tailwind.config.ts"
import config from "../../tailwind.config.cjs"

const fullConfig = resolveConfig(config)

Expand Down
60 changes: 60 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"autoprefixer": "^10.4.19",
"chromatic": "^11.3.0",
"eslint": "^8",
"eslint-config-next": "14.2.2",
Expand Down
6 changes: 6 additions & 0 deletions postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
8 changes: 0 additions & 8 deletions postcss.config.mjs

This file was deleted.

60 changes: 0 additions & 60 deletions stories/Button.stories.ts

This file was deleted.

52 changes: 0 additions & 52 deletions stories/Button.tsx

This file was deleted.

32 changes: 0 additions & 32 deletions stories/Header.stories.ts

This file was deleted.

56 changes: 0 additions & 56 deletions stories/Header.tsx

This file was deleted.

Loading

0 comments on commit aa6341a

Please sign in to comment.