{
title &&
-
{title}
+
{title}
}
{
subtitle &&
diff --git a/src/components/Input/Input.stories.tsx b/src/components/Input/Input.stories.tsx
index ee55cc7..67fcc74 100644
--- a/src/components/Input/Input.stories.tsx
+++ b/src/components/Input/Input.stories.tsx
@@ -1,5 +1,5 @@
import React from 'react';
-import type { Meta, StoryObj, StoryContext } from '@storybook/react';
+import type { Meta, StoryObj, StoryContext } from '@storybook/react-vite';
import Input from './Input';
diff --git a/src/components/Modal/Modal.stories.tsx b/src/components/Modal/Modal.stories.tsx
index 0d3a680..d7629ac 100644
--- a/src/components/Modal/Modal.stories.tsx
+++ b/src/components/Modal/Modal.stories.tsx
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
-import type { Meta, StoryObj, StoryFn, StoryContext } from '@storybook/react';
+import type { Meta, StoryObj, StoryFn, StoryContext } from '@storybook/react-vite';
import Modal from './Modal';
import Button from '../Button';
diff --git a/src/components/Spinner/Spinner.stories.ts b/src/components/Spinner/Spinner.stories.ts
index ee9016d..7382c10 100644
--- a/src/components/Spinner/Spinner.stories.ts
+++ b/src/components/Spinner/Spinner.stories.ts
@@ -1,5 +1,5 @@
-import type { Meta, StoryContext, StoryObj } from '@storybook/react';
-import { fn } from '@storybook/test';
+import type { Meta, StoryContext, StoryObj } from '@storybook/react-vite';
+import { fn } from 'storybook/test';
import Spinner from './Spinner';
diff --git a/src/index.css b/src/index.css
index 0c692dd..1ee7819 100644
--- a/src/index.css
+++ b/src/index.css
@@ -1,6 +1,4 @@
-@tailwind base;
-@tailwind components;
-@tailwind utilities;
+@import "tailwindcss";
/* Custom autofill styles */
input:-webkit-autofill {
diff --git a/src/introduction.mdx b/src/introduction.mdx
index 236b82d..a50213a 100644
--- a/src/introduction.mdx
+++ b/src/introduction.mdx
@@ -1,5 +1,5 @@
-import { Meta, Markdown } from "@storybook/blocks";
+import { Meta, Markdown } from "@storybook/addon-docs/blocks";
import Readme from "../README.md?raw";
diff --git a/tailwind.config.js b/tailwind.config.js
index 9e3a1e0..391b946 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -1,11 +1,11 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
- './src/**/*.{js,ts,jsx,tsx,html}'
- ],
- theme: {
- extend: {},
- },
- plugins: [],
+ "./src/**/*.{js,jsx,ts,tsx}",
+ "./.storybook/**/*.{js,jsx,ts,tsx,mdx}",
+ "./src/**/*.stories.{js,jsx,ts,tsx,mdx}",
+ ],
+ theme: { extend: {} },
+ plugins: [],
}
diff --git a/tsconfig.json b/tsconfig.json
index 4f5fcb1..383ce2f 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -113,7 +113,9 @@
"declarationDir": "./dist/esm/types", // Where to place the .d.ts files
"sourceMap": true, // Mapping JS code back to its TS file origins for debugging / Generates correct line number when it get an issue.
"outDir": "./dist/esm", // Directory where the project will be generated
- "moduleResolution": "node", // Follow node.js rules for finding modules
+ // Use the `bundler` resolution so TypeScript will honor package.json "exports"
+ // fields and resolve modern ESM packages (required for some Storybook types).
+ "moduleResolution": "bundler",
"allowSyntheticDefaultImports": true, // Assumes default exports if none are created manually
"emitDeclarationOnly": true // Don't generate JS (rollup will do that) only export type declarations
},
diff --git a/vite.config.ts b/vite.config.ts
new file mode 100644
index 0000000..f9abd68
--- /dev/null
+++ b/vite.config.ts
@@ -0,0 +1,7 @@
+import { defineConfig } from 'vite'
+
+export default defineConfig({
+ css: {
+ postcss: './postcss.config.js',
+ },
+})