mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
Merge remote-tracking branch 'origin/v3.4' into dev
This commit is contained in:
42
interface/src/project/DeviceIcon.tsx
Normal file
42
interface/src/project/DeviceIcon.tsx
Normal file
@@ -0,0 +1,42 @@
|
||||
import { FC } from 'react';
|
||||
|
||||
import { CgSmartHomeBoiler } from 'react-icons/cg';
|
||||
import { MdOutlineSensors } from 'react-icons/md';
|
||||
import { FaSolarPanel } from 'react-icons/fa';
|
||||
import { MdThermostatAuto } from 'react-icons/md';
|
||||
import { AiOutlineControl } from 'react-icons/ai';
|
||||
import { GiHeatHaze } from 'react-icons/gi';
|
||||
import { TiFlowSwitch } from 'react-icons/ti';
|
||||
import { VscVmConnect } from 'react-icons/vsc';
|
||||
import { AiOutlineGateway } from 'react-icons/ai';
|
||||
|
||||
interface DeviceIconProps {
|
||||
type: string;
|
||||
}
|
||||
|
||||
const DeviceIcon: FC<DeviceIconProps> = ({ type }) => {
|
||||
switch (type) {
|
||||
case 'Boiler':
|
||||
return <CgSmartHomeBoiler />;
|
||||
case 'Sensor':
|
||||
return <MdOutlineSensors />;
|
||||
case 'Solar':
|
||||
return <FaSolarPanel />;
|
||||
case 'Thermostat':
|
||||
return <MdThermostatAuto />;
|
||||
case 'Mixer':
|
||||
return <AiOutlineControl />;
|
||||
case 'Heatpump':
|
||||
return <GiHeatHaze />;
|
||||
case 'Switch':
|
||||
return <TiFlowSwitch />;
|
||||
case 'Connect':
|
||||
return <VscVmConnect />;
|
||||
case 'Gateway':
|
||||
return <AiOutlineGateway />;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
export default DeviceIcon;
|
||||
Reference in New Issue
Block a user