web
web copied to clipboard
Components: components need the library base styles to render correctly
When installing some components on a fresh shadcn project, the component doesn't render correctly due to a missing style file from the library.
Suggestion: Add missing stylesheet import '@xyflow/react/dist/style.css';. This may not be necessary for some of the custom components.
Is this still an issue @peterkogo @printerscanner ?
Yes, but the question is should we add it to each component that needs it and have redundancy or put it in bold somewhere in a tutorial that you need to have your styles imported for components to work.
made a sandbox to check it out, its looking alright with a base node when importing "@xyflow/react/dist/style.css"; in the main app file
https://codesandbox.io/p/github/0x0f0f0f/component-style-test/main?import=true
put it in bold somewhere in a tutorial that you need to have your styles imported for components to work.
I think we should add it to the main readme.
I don't expect a lot of people using our components outside of a react flow, but still worth noting down.