7
mirror of https://github.com/EEVengers/ThunderScope.git synced 2025-04-14 23:59:19 +00:00

skeleton code for single button handler

This commit is contained in:
Jason Bonnell 2021-03-21 11:58:03 -04:00
parent fe7842105f
commit f865bff4c7
2 changed files with 7 additions and 4 deletions
Software/waveview/src
components/sidebar/core
redux/reducers

View File

@ -2,9 +2,9 @@ import React from 'react';
import './../../../css/sidebar/core/singleButton.css';
class SingleButton extends React.Component<any, any> {
handleSingleClick = () => {
alert("Single")
singleClickHandler = () => {
this.props.dispatch({type: 'graph/singleMode'});
}
render() {
@ -12,7 +12,7 @@ class SingleButton extends React.Component<any, any> {
<div className={"SingleButtonComponent"}>
<button
className={"SingleButton"}
onClick={() => this.handleSingleClick()}
onClick={() => this.singleClickHandler()}
>
<label
className={"SingleButtonText"}>

View File

@ -9,6 +9,9 @@ export default function(state = GraphInitialState, action: {type: any, payload:
...state,
currentStatus: newStatus
};
case "graph/singleMode":
// Handle what needs to happen when clicking the Single button
return state;
default:
return state;
}