storybookjs / react-inspector

🔍 Power of Browser DevTools inspectors right inside your React app
https://5d8cb665bc622e0020296079-dippbxxgcq.chromatic.com/
MIT License
774 stars 95 forks source link

Allow additional CSS to top-level component #142

Open aaron-michaux opened 3 years ago

aaron-michaux commented 3 years ago

Describe the bug

I'm trying to implement a scrollbar, and need to add overflow: auto; will-change: transform; to the <Object Inspector /> component. This is, of course, thwarted by the theming implementation. The programmer should be able to add additional CSS directly to the theme, perhaps like so:

theme={
 ...chromeDark,
 ...({
   ADDITIONAL_CSS: 'overflow: auto; will-change: transform;'
 })
}

The absence of scrollbars on an expandable tree widget is... interesting, and may be because of peculiarities of my setup. Nonetheless, my issue can be solved with additional-css.

Steps to reproduce the behavior

This is a missing feature.

As for missing scrollbars... scrollbars fail to appear when ever the tree is larger than the parent widget.

Expected behavior

Would like the ADDITIONAL_CSS text to be added to the top-level element of the rendered ObjectInspector

Screenshots and/or logs

If applicable, add screenshots and/or logs to help explain your problem.

Environment