Skip to content

Commit

Permalink
Fix: naming convention & FW version bumped
Browse files Browse the repository at this point in the history
  • Loading branch information
joe-allen-89 committed Sep 8, 2023
1 parent 0b5ca48 commit 04a8130
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "adapt-close",
"version": "2.2.0",
"framework": ">=5.30.2",
"framework": ">=5.30.3",
"extension": "close",
"displayName": "Close",
"description": "An extension to add a close button and/or prompts",
Expand Down
2 changes: 1 addition & 1 deletion js/CloseNavigationButtonView.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default class CloseNavigationButtonView extends NavigationButtonView {
this.model.get('_notifyPromptIfIncomplete') :
this.model.get('_notifyPromptIfComplete');

if (!prompt || !prompt._isEnabled) return Adapt.trigger('close:confirm');
if (!prompt?._isEnabled) return Adapt.trigger('close:confirm');

notify.prompt({
title: prompt.title,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "adapt-close",
"version": "2.2.0",
"framework": ">=5.30.2",
"framework": ">=5.30.3",
"extension": "close",
"displayName": "Close",
"description": "An extension to add a close button and/or prompts",
Expand Down
25 changes: 25 additions & 0 deletions templates/CloseNavigationButton.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React from 'react';
import { classes, compile } from 'core/js/reactHelpers';

export default function CloseNavigationButton(props) {
const {
text,
_iconClasses
} = props;
return (
<>
<span
className={classes([
'icon',
_iconClasses
])}
aria-hidden="true"
/>
<span
className="nav__btn-label"
aria-hidden="true"
dangerouslySetInnerHTML={{ __html: compile(text, props) }}
/>
</>
);
}

0 comments on commit 04a8130

Please sign in to comment.