import ClassName from 'classnames';
import React from 'react';

export const Widget = (props) => {
  const className = ClassName('Widget', props.className);

  const style = {};
  if (props.appearance) {
    if (props.appearance.color) {
      style.backgroundColor = props.appearance.color;
    }
  }

  return (
    <div className={className} style={style}>
      <div className="widget-content">
        {props.children}
      </div>
    </div>
  );
};
