Use ES Class Fields & Static Properties (#3008)
Use ES Class Fields & Static Properties (currently stage 2) for improve class outlook. Added babel-plugin-transform-class-properties as a Babel plugin.
This commit is contained in:
parent
44a3584e2d
commit
2991a7cfe6
79 changed files with 838 additions and 1128 deletions
|
@ -2,6 +2,11 @@ import React from 'react';
|
|||
import PropTypes from 'prop-types';
|
||||
|
||||
class AvatarOverlay extends React.PureComponent {
|
||||
static propTypes = {
|
||||
staticSrc: PropTypes.string.isRequired,
|
||||
overlaySrc: PropTypes.string.isRequired
|
||||
};
|
||||
|
||||
render() {
|
||||
const {staticSrc, overlaySrc} = this.props;
|
||||
|
||||
|
@ -20,11 +25,7 @@ class AvatarOverlay extends React.PureComponent {
|
|||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
AvatarOverlay.propTypes = {
|
||||
staticSrc: PropTypes.string.isRequired,
|
||||
overlaySrc: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
export default AvatarOverlay;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue