This repository has been archived on 2023-12-22. You can view files and clone it, but cannot push or open issues or pull requests.
old-monorepo/_Dashboard/app/renderer/components/LampButtonAbsolute.js

25 lines
689 B
JavaScript
Raw Normal View History

2020-08-01 16:29:42 +02:00
import React from 'react';
import { useSelector } from 'react-redux/';
import Button from '@material-ui/core/Button';
import EmojiObjectsIcon from '@material-ui/icons/EmojiObjects';
export default function LampButtonToggle(props) {
//const comConnection = useSelector((state) => state.comConnectionReducer);
const comConnection = null;
2020-08-01 16:29:42 +02:00
return (
<div>
<Button
2020-08-01 20:59:08 +02:00
style={{ height: 130, width: 130, marginLeft: 10, marginRight: 10 }}
2020-08-01 16:29:42 +02:00
variant="contained"
2020-08-01 17:14:09 +02:00
color="secondary"
2020-08-01 16:29:42 +02:00
endIcon={<EmojiObjectsIcon />}
onClick={() => {
comConnection.port.write(props.title);
}}>
{props.title}
</Button>
</div>
);
}