代码之家  ›  专栏  ›  技术社区  ›  jgoraya

重写类名在React组件中不起作用

  •  0
  • jgoraya  · 技术社区  · 9 年前

    套圈样式已正确应用于字体,但我对网络聊天组件的自定义更改未被应用。

    应用程序。js公司

    import  '../scss/custom.scss';
    ...
    class PatientApp extends React.Component {
    ...
    render() {
    ...
    <Chat className='wc-app' directline='GUID_Entered_Here />
    

    风俗scss

        @import 'elu.defaults.scss';
        @import '~grommet/scss/grommet-core/index.scss';
    
        body .wc-app, .wc-app button, .wc-app input, .wc-app textarea {
            font-family: 'Segoe UI', sans-serif;
            font-size: 15px;
            background-color: #2AD2C9;
        }
    
    .wc-chatview-panel {
        font-family: 'Segoe UI', sans-serif;
        font-size: 15px;
        font-style: #2AD2C9;
    }
    
    .wc-header {
        font-family: 'Segoe UI', sans-serif;
        font-size: 15px;
        font-style: #2AD2C9;
    }
    
    .wc-message-pane {
        font-family: 'Segoe UI', sans-serif;
        font-size: 15px;
        font-style: #2AD2C9;
    }
    

    下面是一个屏幕截图,显示了我运行代码时输出的HTML。在右边,您会注意到被引用的类名。

    enter image description here

    2 回复  |  直到 9 年前
        1
  •  0
  •   Sagiv b.g    9 年前

    作为 DOCS 说:

    /僵尸聊天。css。一旦你完成了你的任务,运行npm运行build css进行编译 变化。对于基本品牌,请更改颜色。SCS与您的颜色匹配 计划对于高级样式,请更改botchat。scss。

        2
  •  0
  •   jgoraya    9 年前

    全部的 我能够得到这项工作只是设置了一个高度和宽度内的聊天室面板,现在一切都显示正确。