From 04a81303798dc10962a3f26c897006ee82d5b928 Mon Sep 17 00:00:00 2001
From: joe-allen-89 <85872286+joe-allen-89@users.noreply.github.com>
Date: Fri, 8 Sep 2023 09:48:36 +0100
Subject: [PATCH] Fix: naming convention & FW version bumped
---
bower.json | 2 +-
js/CloseNavigationButtonView.js | 2 +-
package.json | 2 +-
templates/CloseNavigationButton.jsx | 25 +++++++++++++++++++++++++
4 files changed, 28 insertions(+), 3 deletions(-)
create mode 100644 templates/CloseNavigationButton.jsx
diff --git a/bower.json b/bower.json
index aa367ce..6f1ea89 100644
--- a/bower.json
+++ b/bower.json
@@ -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",
diff --git a/js/CloseNavigationButtonView.js b/js/CloseNavigationButtonView.js
index c34ea45..7334300 100644
--- a/js/CloseNavigationButtonView.js
+++ b/js/CloseNavigationButtonView.js
@@ -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,
diff --git a/package.json b/package.json
index aa367ce..6f1ea89 100644
--- a/package.json
+++ b/package.json
@@ -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",
diff --git a/templates/CloseNavigationButton.jsx b/templates/CloseNavigationButton.jsx
new file mode 100644
index 0000000..41d04b5
--- /dev/null
+++ b/templates/CloseNavigationButton.jsx
@@ -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 (
+ <>
+
+
+ >
+ );
+}