Styled Components Integration
- Integrated styled-components into all widgets
- Moved global styles to separate import. This stops each widget from redeclaring global styles and CSS variables in the DOM, thus improving performance. The global styles need to be imported at the start of your React app as shown below:
import ReactDOM from "react-dom";
import { RSWGlobalStyle } from "react-simple-widgets/dist/style";
import App from "./app";
/* Other imports */
const root = document.getElementById("root");
ReactDOM.createRoot(root).render(
<React.StrictMode>
<RSWGlobalStyle />
<App/>
</React.StrictMode>
);