code style

This commit is contained in:
afc163 2017-08-16 10:38:37 +08:00
parent f0c6350e0e
commit 8e744545ff

View File

@ -36,8 +36,8 @@ export default class Demo extends React.Component {
shouldComponentUpdate(nextProps, nextState) { shouldComponentUpdate(nextProps, nextState) {
return (this.state.codeExpand || this.props.expand) !== (nextState.codeExpand || nextProps.expand) return (this.state.codeExpand || this.props.expand) !== (nextState.codeExpand || nextProps.expand)
|| this.state.copied !== nextState.copied || this.state.copied !== nextState.copied
|| this.state.copyTooltipVisible !== nextState.copyTooltipVisible; || this.state.copyTooltipVisible !== nextState.copyTooltipVisible;
} }
componentDidMount() { componentDidMount() {
@ -176,7 +176,8 @@ export default class Demo extends React.Component {
</span> </span>
</Tooltip> </Tooltip>
</section> </section>
<section className={highlightClass} <section
className={highlightClass}
key="code" key="code"
> >
<div className="highlight"> <div className="highlight">