From 62e33e132c181988cd7256dbd7844bffc73f5f1e Mon Sep 17 00:00:00 2001 From: Evan Ponter Date: Tue, 2 Mar 2021 09:54:04 -0500 Subject: [PATCH 1/4] Make style edits optional Wrap these style edits in conditions so they can be controlled at each implementation --- NavigationButton/NavigationButtonRenderer.js | 24 +++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/NavigationButton/NavigationButtonRenderer.js b/NavigationButton/NavigationButtonRenderer.js index c223404..2775c57 100644 --- a/NavigationButton/NavigationButtonRenderer.js +++ b/NavigationButton/NavigationButtonRenderer.js @@ -5,18 +5,20 @@ var elements = document.querySelectorAll('[data-holder="NavButtonHolder"]'); //add after last element - var lastElement = elements[elements.length-1 ]; - var newItem = document.createElement("div"); - newItem.setAttribute("style", "clear:both;display:block"); - newItem.setAttribute("special-type", "floatClear"); - lastElement.appendChild(newItem); - + if(component.get("v.appendFloatClearDiv")) { + var lastElement = elements[elements.length-1 ]; + var newItem = document.createElement("div"); + newItem.setAttribute("style", "clear:both;display:block"); + newItem.setAttribute("special-type", "floatClear"); + lastElement.appendChild(newItem); + } //Always ensure a button is clickable - var newCSSstyle= document.createElement("style"); - newCSSstyle.innerHTML = '.slds-card {clear: both; min-height: 6.5REM;' ; - lastElement.appendChild(newCSSstyle); - + if(component.get("v.appendSldsCardStyle")) { + var newCSSstyle= document.createElement("style"); + newCSSstyle.innerHTML = '.slds-card {clear: both; min-height: 6.5REM;' ; + lastElement.appendChild(newCSSstyle); + } //STop weird alignment from @@ -27,4 +29,4 @@ } -}) \ No newline at end of file +}) From 6e5832b3576e7a9dffa9a6331d3d5afac7cb8347 Mon Sep 17 00:00:00 2001 From: Evan Ponter Date: Tue, 2 Mar 2021 09:56:01 -0500 Subject: [PATCH 2/4] Make style edits optional Add attributes that can be specified for each implementation --- NavigationButton/NavigationButton.design | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/NavigationButton/NavigationButton.design b/NavigationButton/NavigationButton.design index b81ae44..6b146be 100644 --- a/NavigationButton/NavigationButton.design +++ b/NavigationButton/NavigationButton.design @@ -1,4 +1,4 @@ - + + + + - \ No newline at end of file + From 7dfce17e45cd2fdf2e643a022bcc189cab99b93a Mon Sep 17 00:00:00 2001 From: Evan Ponter Date: Tue, 2 Mar 2021 09:59:34 -0500 Subject: [PATCH 3/4] Update NavigationButton.design --- NavigationButton/NavigationButton.design | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NavigationButton/NavigationButton.design b/NavigationButton/NavigationButton.design index 6b146be..9c0b747 100644 --- a/NavigationButton/NavigationButton.design +++ b/NavigationButton/NavigationButton.design @@ -1,4 +1,4 @@ - + Date: Tue, 2 Mar 2021 10:00:42 -0500 Subject: [PATCH 4/4] Make style edits optional --- NavigationButton/NavigationButton.cmp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/NavigationButton/NavigationButton.cmp b/NavigationButton/NavigationButton.cmp index b25035f..0400726 100644 --- a/NavigationButton/NavigationButton.cmp +++ b/NavigationButton/NavigationButton.cmp @@ -32,6 +32,9 @@ + + + @@ -68,4 +71,4 @@ - \ No newline at end of file +