message: Rewrite Group to functional component
diff: -
  -import React, { Component } from 'react';
  +import React from 'react';
  import PropTypes from 'prop-types';
  import getClassName from '../../helpers/getClassName';
  import classNames from '../../lib/classNames';
  @@ -7,8 +6,19 @@ import Header from '../Header/Header';
  const baseClassNames = getClassName('Group');
  -export default class Group extends Component {
  - static propTypes = {
  +const Group = props => {
  + const { title, description, className, children, getRootRef, ...restProps } = props;
  +
  + return (
  + <div {...restProps} ref={getRootRef} className={classNames(baseClassNames, className)}>
  + {title && <Header level="2">{title}</Header>}
  + {children && <div className="Group__content">{children}</div>}
  + {description && <div className="Group__description">{description}</div>}
  + </div>
  + );
  +};
  +
  +Group.propTypes = {
  style: PropTypes.object,
  title: PropTypes.node,
  description: PropTypes.node,
  @@ -16,19 +26,10 @@ export default class Group extends Component {
  className: PropTypes.string,
  getRootRef: PropTypes.func
  };
  - static defaultProps = {
  +
  +Group.defaultProps = {
  title: null,
  description: null
  };
  - render () {
  - const { title, description, className, children, getRootRef, ...restProps } = this.props;
  - return (
  - <div {...restProps} ref={getRootRef} className={classNames(baseClassNames, className)}>
  - {title && <Header level="2">{title}</Header>}
  - {children && <div className="Group__content">{children}</div>}
  - {description && <div className="Group__description">{description}</div>}
  - </div>
  - );
  - }
  -}
  +export default Group;
  