mirror of
https://github.com/mue/mue.git
synced 2026-07-16 05:23:49 +02:00
perf: further improve performance
This commit is contained in:
@@ -25,9 +25,9 @@ export default class Checkbox extends React.PureComponent {
|
||||
let text = this.props.text;
|
||||
|
||||
if (this.props.newFeature) {
|
||||
text = <span>{this.props.text} <span className='newFeature'> NEW</span></span>;
|
||||
text = <>{this.props.text} <span className='newFeature'> NEW</span></>;
|
||||
} else if (this.props.betaFeature) {
|
||||
text = <span>{this.props.text} <span className='newFeature'> BETA</span></span>;
|
||||
text = <>{this.props.text} <span className='newFeature'> BETA</span></>;
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -25,9 +25,9 @@ export default class Switch extends React.PureComponent {
|
||||
let text = this.props.text;
|
||||
|
||||
if (this.props.newFeature) {
|
||||
text = <span>{this.props.text} <span className='newFeature'> NEW</span></span>;
|
||||
text = <>{this.props.text} <span className='newFeature'> NEW</span></>;
|
||||
} else if (this.props.betaFeature) {
|
||||
text = <span>{this.props.text} <span className='newFeature'> BETA</span></span>;
|
||||
text = <>{this.props.text} <span className='newFeature'> BETA</span></>;
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
@@ -176,7 +176,7 @@ export default class BackgroundSettings extends React.PureComponent {
|
||||
onChange={(color) => this.onColorPickerChange(color, 'change')}
|
||||
onEndChange={(color) => this.onColorPickerChange(color, 'end')}
|
||||
gradient={this.GradientPickerInitalState}
|
||||
isGradient />
|
||||
isGradient/>
|
||||
);
|
||||
} else {
|
||||
gradientInputs = this.state.gradientSettings.gradient.map((g, i) => {
|
||||
@@ -190,12 +190,12 @@ export default class BackgroundSettings extends React.PureComponent {
|
||||
}
|
||||
|
||||
colourSettings = (
|
||||
<div>
|
||||
<>
|
||||
{gradientInputs}
|
||||
{this.state.gradientSettings.gradient[0].colour !== background.source.disabled &&
|
||||
!gradientHasMoreThanOneColour ? (<button type='button' className='add' onClick={this.addColour}>{background.source.add_colour}</button>) : null
|
||||
}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user