Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个组件,它的 z-index 设置为更大的值。即使当我从左向右滚动时它设置为 1,组件也会加载到 react-styleguidist 侧边栏上。我找不到任何有关通过 styleguide.config.js 覆盖 z-index 的文档。
在 styleguide.config.js 中将 zIndex 添加到侧边栏属性解决了我的问题。这是我需要添加以覆盖配置文件中的 z-index 的片段。
module.exports = { styles: { StyleGuide: { sidebar: { zIndex: 3 } } } }
当我输入问题时,通过命中和试用方法发现了这一点。