Comments (2)
I have the same issue with Storybook + React but I can't find solution for that 😥
from storybook.
Describe the bug
Steps to reproduce the issue
- Install and Set up a Project Remix V2
- Install Tailwind CSS in Remix Project
I experimented with adding the Available breakpoints class, for example "md:hidden ", I found that it worked fine. When running on Remix
I want to install storybook into Remix and Tailwind.css.***3. After installing Storybook, I encountered an issue can't use the Available breakpoints class, such as "md:hidden". How can I resolve this problem?
import { NavLink } from '@remix-run/react' {/* can't use the Available breakpoints class when install storybook */} <NavLink to="#" className="md:hidden">Test hidden</NavLink>
To Reproduce
Run Storybook and notice that the still appears in the Storybook, and the hidden command does not work even when using a desktop screen.
System
System: OS: macOS 14.3.1 CPU: (8) arm64 Apple M2 Shell: 5.9 - /bin/zsh Binaries: Node: 20.11.1 - /usr/local/bin/node npm: 10.2.4 - /usr/local/bin/npm <----- active Browsers: Chrome: 123.0.6312.87 Safari: 17.3.1 npmPackages: @storybook/addon-essentials: ^8.0.5 => 8.0.5 @storybook/addon-interactions: ^8.0.5 => 8.0.5 @storybook/addon-links: ^8.0.5 => 8.0.5 @storybook/addon-onboarding: ^8.0.5 => 8.0.5 @storybook/addon-styling-webpack: ^1.0.0 => 1.0.0 @storybook/blocks: ^8.0.5 => 8.0.5 @storybook/react: ^8.0.5 => 8.0.5 @storybook/react-vite: ^8.0.5 => 8.0.5 @storybook/test: ^8.0.5 => 8.0.5 eslint-plugin-storybook: ^0.8.0 => 0.8.0 storybook: ^8.0.5 => 8.0.5Additional context
No response
In my case I found the solution. In tailwind.config.ts
I have wrong scope for the project in the content
field of the config
object.
This is my code:
import type { Config } from 'tailwindcss'
const config = {
darkMode: ['class'],
content: ['./src/**/*.{js,ts,jsx,tsx,mdx}'],
prefix: '',
theme: {
container: {
center: true,
padding: '2rem',
screens: {
'2xl': '1400px',
},
},
extend: {
colors: {
border: 'rgb(var(--border) / <alpha-value>)',
input: 'rgb(var(--input) / <alpha-value>)',
},
borderRadius: {
lg: 'var(--radius)',
md: 'calc(var(--radius) - 2px)',
sm: 'calc(var(--radius) - 4px)',
},
keyframes: {
'accordion-down': {
from: { height: '0' },
to: { height: 'var(--radix-accordion-content-height)' },
},
'accordion-up': {
from: { height: 'var(--radix-accordion-content-height)' },
to: { height: '0' },
},
shimmer: {
'100%': {
transform: 'translateX(100%)',
},
},
},
animation: {
'accordion-down': 'accordion-down 0.2s ease-out',
'accordion-up': 'accordion-up 0.2s ease-out',
},
},
},
plugins: [require('tailwindcss-animate')],
} satisfies Config
export default config
from storybook.
Related Issues (20)
- [Bug]: Cannot read properties of undefined (reading 'fonts') HOT 3
- [Bug]: Uncaught TypeError: Refresh.isLikelyComponentType is not a function HOT 3
- In @storybook/addon-docs react has been moved from peerDependencies to dependencies HOT 1
- [Bug]: Angular - Wrong detection of standalone components when inheriting HOT 1
- RollupError: "X" is not exported by "../constants/dist/index.js", imported by "path/file.tsx".
- [Bug]: find-implicit-spies codemod doesn't exist HOT 2
- [Project SfC]: Preview - Error screen adjustments HOT 1
- Could not resolve "./sb-preview/runtime.js" from "iframe.html"
- [Bug]: Cannot find module 'react-dom/client' with portable stories in React 17 projects. HOT 2
- [Bug]: next/font/local is not worked in storybook with vanilla Extract HOT 2
- [Project SfC]: Create the frontend to create a new story file from scratch
- [Bug]: The error message is that there is no default export. HOT 1
- [Bug]: Storybook Server 8.0.8 autodoc error - Element type is invalid
- [Bug]: `useParams` returns null in NextJS 14.2. Storybook 7 & 8 HOT 2
- [Bug]: Deploying to Github Pages is creating `assets/assets` path
- [Bug]: The accessibility scan encountered an error. {"name":"TypeError"} HOT 2
- [Bug]: Module parse failed: Unexpected token HOT 3
- [Bug]: Missing "./dist/react-18" after upgrading storybook to v8 with vitejs v5 HOT 2
- [Project SfC]: Testing
- [Bug]: Storybook doesn't run with tailwindcss in next.js HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from storybook.