import React, {Component} from 'react';
import PropTypes from 'prop-types';

/**
 * 条件分支容器
 */
class Case extends Component {
  static propTypes = {
    is: PropTypes.any,
    style: PropTypes.object,
    children: PropTypes.any
  }

  static defaultProps = {
    is: true
  }

  render() {
    const {style} = this.props;
    return (
      <div style={style}>
        {this.props.children}
      </div>
    );
  }
}

export default Case;

