初始化 antd-pro
This commit is contained in:
25
admin-web/src/components/SettingDrawer/BlockCheckbox.js
Normal file
25
admin-web/src/components/SettingDrawer/BlockCheckbox.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import React from 'react';
|
||||
import { Tooltip, Icon } from 'antd';
|
||||
import style from './index.less';
|
||||
|
||||
const BlockChecbox = ({ value, onChange, list }) => (
|
||||
<div className={style.blockChecbox} key={value}>
|
||||
{list.map(item => (
|
||||
<Tooltip title={item.title} key={item.key}>
|
||||
<div className={style.item} onClick={() => onChange(item.key)}>
|
||||
<img src={item.url} alt={item.key} />
|
||||
<div
|
||||
className={style.selectIcon}
|
||||
style={{
|
||||
display: value === item.key ? 'block' : 'none',
|
||||
}}
|
||||
>
|
||||
<Icon type="check" />
|
||||
</div>
|
||||
</div>
|
||||
</Tooltip>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
|
||||
export default BlockChecbox;
|
||||
Reference in New Issue
Block a user