-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Notifications in
auth0 ul template update
preview (#895)
* Adding notification in storybook * Adding notification in CLI * Adjust command path in helper text --------- Co-authored-by: Will Vedder <[email protected]> Co-authored-by: Sergiu Ghitea <[email protected]>
- Loading branch information
1 parent
ad1ff8c
commit 991514d
Showing
3 changed files
with
49 additions
and
1 deletion.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
internal/cli/data/branding/storybook/branding-customization-notification.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
document.addEventListener('DOMContentLoaded', function () { | ||
var checkIfStorybookRendered = setInterval(function () { | ||
var targetDiv = document.querySelectorAll("#panel-tab-content > div")[0]; | ||
if (targetDiv) { | ||
clearInterval(checkIfStorybookRendered); | ||
var insertHTML = ` | ||
<div | ||
id="branding-customization-notification" | ||
style=" | ||
padding: 30px 20px 20px; | ||
background: #ffff57; | ||
margin: 0; | ||
position:relative; | ||
" | ||
> | ||
<p style=" | ||
line-height: 1.45em; | ||
font-size: 1.4em; | ||
">An improved branding customization UI experience is available through the <b><code>auth0 universal-login customize</code></b> command.</p> | ||
<button | ||
id="branding-close-button" | ||
style=" | ||
position: absolute; | ||
top:0px; | ||
right:0px; | ||
background: transparent; | ||
border: none; | ||
padding: 10px 15px; | ||
cursor:pointer; | ||
text-decoration: underline; | ||
" | ||
>Close</button> | ||
</div> | ||
`; | ||
targetDiv.innerHTML = insertHTML + targetDiv.innerHTML; | ||
|
||
var brandingCloseButton = document.getElementById('branding-close-button'); | ||
brandingCloseButton.addEventListener('click', function () { | ||
var brandingCustomizationNotification = document.getElementById('branding-customization-notification'); | ||
if (brandingCustomizationNotification) { | ||
brandingCustomizationNotification.remove(); | ||
} | ||
}); | ||
} | ||
}, 100); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters