I'm trying to use the react-widget and I'm facing the following issue:
Expected:
See the default ReactWidget ponent.
Actual:
The ponent does not load the styles.
It can be reproduced here:
I've tried different lib versions for react and react-widget and the result was the same. I'm missing something? Do I need to define at the DropdownList the itemComponent prop or by default it should give me the expected result?
I'm trying to use the react-widget and I'm facing the following issue:
Expected:
See the default ReactWidget ponent.
Actual:
The ponent does not load the styles.
It can be reproduced here:
I've tried different lib versions for react and react-widget and the result was the same. I'm missing something? Do I need to define at the DropdownList the itemComponent prop or by default it should give me the expected result?
Share Improve this question asked Jul 31, 2018 at 15:50 Edmar BarrosEdmar Barros 331 silver badge5 bronze badges 1-
Keep in mind CodeSandbox is very tedious when doing imports into style files. So if you add the
import "react-widgets/dist/css/react-widgets.css";
to the style.css file it might not work in the CodeSandbox editor. But from experience using react-widgets, yes you do need to include the css in your styles file. – Xavid Ramirez Commented Jul 31, 2018 at 16:07
2 Answers
Reset to default 6You have to import the CSS that es with the react-widget
library to give it its styling.
import "react-widgets/dist/css/react-widgets.css";
Import the stylesheet like this:
import "react-widgets/styles.css";