<Experience
startYear={2019}
endYear={2019}
jobName="First Job"
jobDescription="1. Providing API calls support for Headless CMS.2. Provide escalated ticket/incident management support"
/>
在这里,我想在第二点之后换行,我尝试了 '\n' 和 br,这个标签是通过以下代码在 JSX 中制作的:
import React, { Component } from 'react';
import { Grid, Cell } from 'react-mdl';
class Experience extends Component {
render() {
return(
<Grid>
<Cell col={4}>
<p>{this.props.startYear} - {this.props.endYear}</p>
</Cell>
<Cell col={8}>
<h4 style={{marginTop:'0px'}}>{this.props.jobName}</h4>
<p>{this.props.jobDescription}</p>
</Cell>
</Grid>
)
}
}
export default Experience;
弑天下
守候你守候我
相关分类