我创建了一个新的 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;
实际结果
预期结果