如何更改文档内容的宽度?

Cru*_*Xia 0 react-styleguidist

max-width'main' 元素的默认值是1000px,我想让它更宽。我尝试了自定义样式指令,但无法通过“styleguide.config.js”中的以下配置找到“main”元素或“rsg--content-xx”类

styles: {
  StyleGuide: {
    'rsg--content': {
      maxWidth: 1300,
      width: 1300
    },
    '@global main': {
      maxWidth: 1300,
      width: 1300
    }
  }
}
Run Code Online (Sandbox Code Playgroud)

任何帮助将不胜感激。

Joe*_*fei 5

StyleGuideRenderer组件中的styles函数以主题为参数。设置在主题中。您可以在 styleguide.config.js 中覆盖主题属性:maxWidth

module.exports = {
  theme: {
    maxWidth: 1300
  }
}
Run Code Online (Sandbox Code Playgroud)