This commit is contained in:
Ben Durrant 2024-06-10 10:40:56 +01:00 committed by GitHub
commit fd05f192a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 5 deletions

View File

@ -0,0 +1,5 @@
---
'@redux-devtools/app': minor
---
Enable lock button for non-Redux connections

View File

@ -52,9 +52,7 @@ export default class TopButtons extends Component<Props> {
<Toolbar borderPosition="bottom"> <Toolbar borderPosition="bottom">
{features.pause && <RecordButton paused={isPaused} />} {features.pause && <RecordButton paused={isPaused} />}
{features.persist && <PersistButton />} {features.persist && <PersistButton />}
{features.lock && ( {features.lock && <LockButton locked={isLocked} />}
<LockButton locked={isLocked} disabled={options.lib !== 'redux'} />
)}
<Divider /> <Divider />
<Button <Button
title="Reset to the state you created the store with" title="Reset to the state you created the store with"

View File

@ -8,7 +8,6 @@ import { Dispatch } from 'redux';
type DispatchProps = ReturnType<typeof mapDispatchToProps>; type DispatchProps = ReturnType<typeof mapDispatchToProps>;
interface OwnProps { interface OwnProps {
locked: boolean | undefined; locked: boolean | undefined;
disabled: boolean;
} }
type Props = DispatchProps & OwnProps; type Props = DispatchProps & OwnProps;
@ -21,7 +20,6 @@ class LockButton extends Component<Props> {
return ( return (
<Button <Button
tooltipPosition="bottom" tooltipPosition="bottom"
disabled={this.props.disabled}
mark={this.props.locked && 'base0D'} mark={this.props.locked && 'base0D'}
title={this.props.locked ? 'Unlock changes' : 'Lock changes'} title={this.props.locked ? 'Unlock changes' : 'Lock changes'}
onClick={this.props.lockChanges} onClick={this.props.lockChanges}