How would you add a global css file as a custom ThemeProvider component in React? I'm building a component library for NPM. So it would enable another React application to use the css file globally.
I've tried creating one like this:
import React from 'react';
import './global.css';
interface Types {
children: React.ReactNode
}
export default (props:Types) => <div>{props.children}</div>
I found a neat solution. It creates a
<style />
tag with the contents of a css file: