diff --git a/sass/css/_shop.scss b/sass/css/_shop.scss index 52101a4..9e420cb 100644 --- a/sass/css/_shop.scss +++ b/sass/css/_shop.scss @@ -454,12 +454,29 @@ button { height: 24px; } - > .alert-warning, .alert-info { + > .alert-warning, .alert-info, .options-notification { background-color: inherit; height: inherit; width: 20px; padding-bottom: 3px; } + .options-notification { + position: relative; + display: inline-block; + + .options-badge { + position: absolute; + top: -2.5px; + right: -3.5px; + padding: 0; + color: white; + width: 7px; + height: 7px; + background-image: url("/images/shop/icon-notification.svg") ; + background-repeat: no-repeat; + background-size: 7px; + } + } } .overlayRemove { diff --git a/static/js/shop/options/DialogPopup.jsx b/static/js/shop/options/DialogPopup.jsx index 6e96e0f..352da85 100644 --- a/static/js/shop/options/DialogPopup.jsx +++ b/static/js/shop/options/DialogPopup.jsx @@ -20,7 +20,7 @@ export function DialogPopup({options, data, target, id, big, first, last, option
diff --git a/static/js/shop/options/Notification.jsx b/static/js/shop/options/Notification.jsx index f377638..a1c7e54 100644 --- a/static/js/shop/options/Notification.jsx +++ b/static/js/shop/options/Notification.jsx @@ -3,17 +3,24 @@ import React, {useState} from "react"; export function Notification({id, tip, content}) { const [show, setShow] = useState(true); + const onClickHandler = (event) => { + // prevent removing badge on touchables + if (!event.target.classList.contains("options-badge")) + setShow(false); + }; + return ( -
setShow(false)}> +
{content} - {tip}} > - - + + : null} +
) } \ No newline at end of file