Skip to content

Commit

Permalink
use CancelButton in TreeViewFinder
Browse files Browse the repository at this point in the history
  • Loading branch information
anistouri committed Nov 16, 2023
1 parent 3047ccc commit 0af5d21
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
7 changes: 3 additions & 4 deletions src/components/TreeViewFinder/TreeViewFinder.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import Typography from '@mui/material/Typography';
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
import ChevronRightIcon from '@mui/icons-material/ChevronRight';
import CheckIcon from '@mui/icons-material/Check';
import CancelButton from '../react-hook-form/utils/cancel-button';

// As a bunch of individual variables to try to make it easier
// to track that they are all used. Not sure, maybe group them in an object ?
Expand Down Expand Up @@ -345,16 +346,14 @@ const TreeViewFinder = (props) => {
</TreeView>
</DialogContent>
<DialogActions>
<Button
<CancelButton
style={{ float: 'left', margin: '5px' }}
onClick={() => {
onClose([]);
setSelected([]);
}}
{...cancelButtonProps}
>
<FormattedMessage id="treeview_finder/cancel" />
</Button>
/>
<Button
variant="outlined"
style={{ float: 'left', margin: '5px' }}
Expand Down
4 changes: 2 additions & 2 deletions src/components/translations/common-button-en.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
*/

const common_button_en = {
'cancel': 'Cancel',
'validate': 'Validate',
cancel: 'Cancel',
validate: 'Validate',
};

export default common_button_en;
1 change: 0 additions & 1 deletion src/components/translations/treeview-finder-en.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

const treeview_finder_en = {
'treeview_finder/close': 'Close',
'treeview_finder/cancel': 'Cancel',
'treeview_finder/validate': 'Validate',
'treeview_finder/add': 'Add...',
'treeview_finder/deleteSelection': 'Delete selection',
Expand Down
1 change: 0 additions & 1 deletion src/components/translations/treeview-finder-fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

const treeview_finder_fr = {
'treeview_finder/close': 'Fermer',
'treeview_finder/cancel': 'Annuler',
'treeview_finder/validate': 'Valider',
'treeview_finder/add': 'Ajouter...',
'treeview_finder/deleteSelection': 'Supprimer la selection',
Expand Down

0 comments on commit 0af5d21

Please sign in to comment.