mirror of
https://github.com/datahub-project/datahub.git
synced 2025-10-18 04:16:28 +00:00
17 lines
437 B
TypeScript
17 lines
437 B
TypeScript
![]() |
import React from 'react';
|
||
|
import { EditOutlined, ReadOutlined, SettingOutlined, UserOutlined } from '@ant-design/icons';
|
||
|
|
||
|
export const mapRoleIcon = (roleName) => {
|
||
|
let icon = <UserOutlined />;
|
||
|
if (roleName === 'Admin') {
|
||
|
icon = <SettingOutlined />;
|
||
|
}
|
||
|
if (roleName === 'Editor') {
|
||
|
icon = <EditOutlined />;
|
||
|
}
|
||
|
if (roleName === 'Reader') {
|
||
|
icon = <ReadOutlined />;
|
||
|
}
|
||
|
return icon;
|
||
|
};
|