import React, { CSSProperties, PureComponent } from 'react'; import { ActionCreators, LiftedAction } from '@redux-devtools/core'; import type { Base16Theme } from 'react-base16-styling'; import { Action, Dispatch } from 'redux'; import LogMonitorButton from './LogMonitorButton'; import { LogMonitorAction } from './actions'; import { LogMonitorState } from './reducers'; const { reset, rollback, commit, sweep } = ActionCreators; const style: CSSProperties = { textAlign: 'center', borderBottomWidth: 1, borderBottomStyle: 'solid', borderColor: 'transparent', zIndex: 1, display: 'flex', flexDirection: 'row', }; interface Props> { theme: Base16Theme; dispatch: Dispatch>; hasStates: boolean; hasSkippedActions: boolean; } export default class LogMonitorButtonBar< S, A extends Action, > extends PureComponent> { handleRollback = () => { this.props.dispatch(rollback()); }; handleSweep = () => { this.props.dispatch(sweep()); }; handleCommit = () => { this.props.dispatch(commit()); }; handleReset = () => { this.props.dispatch(reset()); }; render() { const { theme, hasStates, hasSkippedActions } = this.props; return (
Reset Revert Sweep Commit
); } }