Skip to content

Commit

Permalink
Change flyout title when editing link panel
Browse files Browse the repository at this point in the history
  • Loading branch information
Heenawter committed Jul 14, 2023
1 parent 263d338 commit be256b1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,11 @@ const NavigationEmbeddablePanelEditor = ({
<div ref={editLinkFlyoutRef} />
<EuiFlyoutHeader hasBorder>
<EuiTitle size="m">
<h2>{NavEmbeddableStrings.editor.panelEditor.getCreateFlyoutTitle()}</h2>
<h2>
{initialInput.links && Object.keys(initialInput.links).length > 0
? NavEmbeddableStrings.editor.panelEditor.getEditFlyoutTitle()
: NavEmbeddableStrings.editor.panelEditor.getCreateFlyoutTitle()}
</h2>
</EuiTitle>
</EuiFlyoutHeader>
<EuiFlyoutBody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ export const NavEmbeddableStrings = {
i18n.translate('navigationEmbeddable.panelEditor.createFlyoutTitle', {
defaultMessage: 'Create links panel',
}),
getEditFlyoutTitle: () =>
i18n.translate('navigationEmbeddable.panelEditor.editFlyoutTitle', {
defaultMessage: 'Edit links panel',
}),
getSaveButtonLabel: () =>
i18n.translate('navigationEmbeddable.panelEditor.saveButtonLabel', {
defaultMessage: 'Save',
Expand Down

0 comments on commit be256b1

Please sign in to comment.