LayoutSetting.js 1019 Bytes
Newer Older
jim's avatar
jim committed
1
import { Tooltip } from 'antd';
jim's avatar
jim committed
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
import React from 'react';
import NavSate from './navState';

const LayoutSetting = ({ value, onChange }) => {
  return (
    <div
      style={{
        margin: 5,
        display: 'flex',
      }}
    >
      {['sidemenu', 'topmenu'].map(layout => (
        <div
          onClick={() => onChange && onChange(layout)}
          key={layout}
          style={{
            width: 70,
            height: 44,
            textAlign: 'center',
            margin: 8,
          }}
        >
jim's avatar
jim committed
24
          <NavSate type={layout} state={value === layout ? 'active' : 'default'} alt={layout} />
jim's avatar
jim committed
25 26
        </div>
      ))}
jim's avatar
jim committed
27 28 29 30 31 32 33 34 35 36 37 38 39
      <Tooltip title="等待后期实现!">
        <div
          key="topside"
          style={{
            width: 70,
            height: 44,
            textAlign: 'center',
            margin: 8,
          }}
        >
          <NavSate type="topside" state="disable" alt="topside" />
        </div>
      </Tooltip>
jim's avatar
jim committed
40 41 42 43 44
    </div>
  );
};

export default LayoutSetting;