From 2796f750ee3c914783dcb1982177fbd35fcca98e Mon Sep 17 00:00:00 2001 From: Alf Eaton Date: Wed, 3 May 2023 09:27:13 +0100 Subject: [PATCH] Rename TrackChangesToggleButton prop to match onMouseDown attribute (#12862) GitOrigin-RevId: bf2a83c58298ee809f181d95beddec695d223922 --- .../components/toolbar-header.js | 2 +- .../components/track-changes-toggle-button.js | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/services/web/frontend/js/features/editor-navigation-toolbar/components/toolbar-header.js b/services/web/frontend/js/features/editor-navigation-toolbar/components/toolbar-header.js index a3b5cc7e02..bed6fe78d6 100644 --- a/services/web/frontend/js/features/editor-navigation-toolbar/components/toolbar-header.js +++ b/services/web/frontend/js/features/editor-navigation-toolbar/components/toolbar-header.js @@ -68,7 +68,7 @@ const ToolbarHeader = React.memo(function ToolbarHeader({ {shouldDisplayTrackChangesButton && ( diff --git a/services/web/frontend/js/features/editor-navigation-toolbar/components/track-changes-toggle-button.js b/services/web/frontend/js/features/editor-navigation-toolbar/components/track-changes-toggle-button.js index f8477645c6..ce838c428c 100644 --- a/services/web/frontend/js/features/editor-navigation-toolbar/components/track-changes-toggle-button.js +++ b/services/web/frontend/js/features/editor-navigation-toolbar/components/track-changes-toggle-button.js @@ -2,7 +2,11 @@ import PropTypes from 'prop-types' import classNames from 'classnames' import { useTranslation } from 'react-i18next' -function TrackChangesToggleButton({ trackChangesIsOpen, disabled, onClick }) { +function TrackChangesToggleButton({ + trackChangesIsOpen, + disabled, + onMouseDown, +}) { const { t } = useTranslation() const classes = classNames('btn', 'btn-full-height', { active: trackChangesIsOpen && !disabled, @@ -11,7 +15,7 @@ function TrackChangesToggleButton({ trackChangesIsOpen, disabled, onClick }) { return (
- @@ -22,7 +26,7 @@ function TrackChangesToggleButton({ trackChangesIsOpen, disabled, onClick }) { TrackChangesToggleButton.propTypes = { trackChangesIsOpen: PropTypes.bool, disabled: PropTypes.bool, - onClick: PropTypes.func.isRequired, + onMouseDown: PropTypes.func.isRequired, } export default TrackChangesToggleButton