Library Panels: Change wording of ChangeLibraryPanelModal (#33424)

"Changing library panel" -> "Replace with library panel"
This commit is contained in:
kay delaney 2021-04-27 15:14:31 +01:00 committed by GitHub
parent 2a8c36c976
commit ed3b87f165
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,13 +12,15 @@ export interface ChangeLibraryPanelModalProps {
export const ChangeLibraryPanelModal = ({ onConfirm, onDismiss, panel }: ChangeLibraryPanelModalProps): JSX.Element => {
const isLibraryPanel = isPanelModelLibraryPanel(panel);
const title = `${isLibraryPanel ? 'Changing' : 'Change to'} library panel`;
const body = `Changing ${isLibraryPanel ? '' : 'to a'} library panel will remove any changes since last save.`;
const title = `${isLibraryPanel ? 'Changing' : 'Replace with'} library panel`;
const body = `${
isLibraryPanel ? 'Changing' : 'Replacing with a'
} library panel will remove any changes since last save.`;
return (
<ConfirmModal
onConfirm={onConfirm}
onDismiss={onDismiss}
confirmText="Change"
confirmText={isLibraryPanel ? 'Change' : 'Replace'}
title={title}
body={body}
dismissText="Cancel"