Add close button

This commit is contained in:
Sodbileg Gansukh 2023-04-19 15:05:14 +01:00 committed by Elena Baidakova
parent af6b474e23
commit 6e1cb2f8ad
2 changed files with 7 additions and 5 deletions

View File

@ -1,7 +1,5 @@
.gh-announcement-bar {
top: 0;
right: 0;
left: 0;
position: relative;
display: flex;
align-items: center;
justify-content: center;
@ -61,6 +59,6 @@
}
.gh-announcement-bar svg {
width: 16px;
height: 16px;
width: 12px;
height: 12px;
}

View File

@ -1,6 +1,7 @@
import React from 'react';
import './AnnouncementBar.css';
import {ReactComponent as CloseIcon} from '../icons/clear.svg';
export function AnnouncementBar({settings}) {
// eslint-disable-next-line no-unused-vars
@ -9,6 +10,9 @@ export function AnnouncementBar({settings}) {
return (
<div className="gh-announcement-bar dark">
<div className="gh-announcement-bar-content" dangerouslySetInnerHTML={{__html: data.content}}></div>
<button>
<CloseIcon />
</button>
</div>
);
}