Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add isBrowser as a property of sheet so that it can be manually set. (#…
…377) Why? You can get get the size of the css output in storybook or any other demo. ``` const renderedCssSize = (Component = () => <div />) => { sheet.isBrowser = false; sheet.flush(); const { css } = extractCritical(() => ReactDOMServer.renderToString( <ThemeProvider theme={theme}> <Component /> </ThemeProvider>, ), ); sheet.isBrowser = true; return css.length; }; ```
- Loading branch information