import { Layout } from 'antd';
import * as React from 'react';
import * as Tools from 'jad-tool'
import classname from 'classnames'
const { Header } = Layout;


const defaultStyle = {
    background: '#fff',
    padding: '0',
    paddingLeft: '20px',
    boxShadow: '0 3px 6px rgba(3, 4, 6, .2)',
    zIndex: 39,
}


export class Headers extends React.Component<{
  left: JSX.Element;
  right: JSX.Element;
  className?: string;
  style?: any;
}> {
  public render() {
    const { left, right ,style={},className='' } = this.props;
    const newStyle = Tools.extend(defaultStyle,style)
    return (
      <Header
        className={classname('flex','flex-jcsb',className)}
        style={newStyle}
      >
        <div className="flex flex-ac">{left}</div>
        <div className="flex flex-ac">{right}</div>
      </Header>
    );
  }
}
