Update messages styling

This commit is contained in:
Sonny Bakker 2020-10-06 22:34:24 +02:00
parent 48388a47f6
commit f12639987f
2 changed files with 27 additions and 6 deletions

View file

@ -22,7 +22,7 @@ class Messages extends React.Component {
); );
}); });
return <ul className="list messages">{messages}</ul>; return <ul className="list messages messages--fixed">{messages}</ul>;
} }
} }

View file

@ -3,12 +3,10 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
position: fixed;
top: 0;
width: 100%; width: 100%;
margin: 5px 0 20px 0; margin: 5px 0 20px 0;
color: $white; color: $font-color;
&__item { &__item {
width: 80%; width: 80%;
@ -17,7 +15,7 @@
padding: 20px 15px; padding: 20px 15px;
margin: 5px 0; margin: 5px 0;
background-color: $blue; background-color: $transparant-blue;
&--error { &--error {
background-color: $transparant-red; background-color: $transparant-red;
@ -27,7 +25,6 @@
background-color: $transparant-orange; background-color: $transparant-orange;
} }
// TODO check this color
&--success { &--success {
background-color: $transparant-green; background-color: $transparant-green;
} }
@ -39,4 +36,28 @@
--ggs: 2; --ggs: 2;
} }
} }
&--fixed {
position: fixed;
top: 0;
}
&--fixed &__item {
color: $white;
background-color: $blue;
}
&--fixed &__item--error {
color: $white;
background-color: $red;
}
&--fixed &__item--warning {
background-color: $orange;
}
&--fixed &__item--success {
color: $white;
background-color: $green;
}
} }