I'm currently struggling with applying CSS successfully to components imported from an npm library. My main challenge seems to be my use of css-loader in the react starter kit (https://github.com/kriasoft/react-starter-kit) without a full understanding of its functionality.
While exploring various datepicker libraries like https://github.com/YouCanBookMe/react-datetime and https://github.com/wangzuo/input-moment, I noticed that these libraries assign local class names to HTML elements, making it challenging to automatically apply embedded formats. I've tried importing styles from /node_modules manually into the component using the library component. Alternatively, I attempted copying relevant styles to a local CSS file and importing them, but neither approach seemed to work smoothly.
The issue appears to stem from css-loader converting imported styles' class names into module-specific class names that do not align with the actual class names found in the resulting HTML code.
Am I going about this the wrong way? What is the recommended method for importing components and implementing custom styling effectively?
Thank you!