mdbreact默认样式未在reactjs中加载

时间:2020-07-05 21:22:55

标签: reactjs styling mdbreact

我创建了一个新的react应用程序,然后使用mdbreact创建了一个注册表单组件,并且一切正常。突然,与mdbreact相关的默认样式突然停止了加载。

import React, { Component } from 'react';
import { MDBContainer, MDBRow, MDBCol, MDBBtn, MDBCard, MDBCardBody, MDBInput  } from 'mdbreact';

class Registration extends Component {
 
  render() { 
    return (          
        <MDBContainer>
        <MDBRow className="d-flex justify-content-center">
          <MDBCol md="6">
            <form>
              <p className="h5 text-center mb-4">Sign up</p>
              <div className="grey-text">
                <MDBInput label="Your name" icon="user" group type="text" validate error="wrong"
                  success="right" />
                <MDBInput label="Your email" icon="envelope" group type="email" validate error="wrong"
                  success="right" />
                <MDBInput label="Confirm your email" icon="exclamation-triangle" group type="text" validate
                  error="wrong" success="right" />
                <MDBInput label="Your password" icon="lock" group type="password" validate />
              </div>
              <div className="text-center">
                <MDBBtn color="primary">Register</MDBBtn>
              </div>
            </form>
          </MDBCol>
        </MDBRow>
      </MDBContainer>
    );
  }
}

export default Registration;

实际结果

enter image description here

预期结果

enter image description here

0 个答案:

没有答案