You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using Chakra UI to render a menu. Each MenuItem component is rendered as a button element. In a menu of two items, the second item is misaligned since it's given a left margin by the CSS rule:
button+button {
margin-left:10px;
}
from header.css, which appears to come from Storybook. Is there a way to avoid this CSS being included? Apologies if I've misunderstood something!
Actual:
Expected:
To Reproduce
Steps to reproduce the behavior:
Create a fresh React application using Create React App: npx create-react-app app; cd app
Install Chakra UI: npm install @chakra-ui/react framer-motion @emotion/react @emotion/styled
Install Storybook: npx sb init
Fix Chakra UI / Storybook integration by updating .storybook/main.js:
Describe the bug
I'm using Chakra UI to render a menu. Each
MenuItem
component is rendered as abutton
element. In a menu of two items, the second item is misaligned since it's given a left margin by the CSS rule:from
header.css
, which appears to come from Storybook. Is there a way to avoid this CSS being included? Apologies if I've misunderstood something!Actual:
Expected:
To Reproduce
Steps to reproduce the behavior:
Create a fresh React application using Create React App:
npx create-react-app app; cd app
Install Chakra UI:
npm install @chakra-ui/react framer-motion @emotion/react @emotion/styled
Install Storybook:
npx sb init
Fix Chakra UI / Storybook integration by updating
.storybook/main.js
:Create a story with a menu:
Expected behavior
Buttons are correctly aligned.
System
The text was updated successfully, but these errors were encountered: