Skip to content

Commit

Permalink
frontend/alert: move alert over navbar. fix #126
Browse files Browse the repository at this point in the history
  • Loading branch information
ffreddow committed Dec 9, 2024
1 parent 6ca62f0 commit f8d4f8e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/components/Alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function showAlert(text: string, variant: string, heading?: string) {
}

export function ErrorAlert() {
return <Alert variant={state.value.variant} onClose={(a, b) => {
return <Alert className="custom-alert" variant={state.value.variant} onClose={(a, b) => {
state.value = {
text: "",
show: false,
Expand Down
10 changes: 10 additions & 0 deletions frontend/src/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ $navbar-color: #555;
background-color: $navbar-color;
box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15) !important;
height: $navbar-height;
z-index: 1020;
}

.navbar .navbar-toggler {
Expand Down Expand Up @@ -83,3 +84,12 @@ th:hover:has(div) {
border-bottom-left-radius: 0 !important;
border-top-left-radius: 0 !important;
}

.custom-alert {
position: absolute;
top: 0;
right: 0;
left: 0;
z-index: 1021;
margin: 0;
}

0 comments on commit f8d4f8e

Please sign in to comment.