LayoutSetting.js 948 Bytes
Newer Older
jim's avatar
jim committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
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,
          }}
        >
          <NavSate
            type={layout}
            state={value === layout ? 'active' : 'default'}
            alt={layout}
          />
        </div>
      ))}
      <div
        key="topside"
        style={{
          width: 70,
          height: 44,
          textAlign: 'center',
          margin: 8,
        }}
      >
        <NavSate type="topside" state="disable" alt="topside" />
      </div>
    </div>
  );
};

export default LayoutSetting;