Skip to content

Commit

Permalink
feat: move code from toast to flash file
Browse files Browse the repository at this point in the history
  • Loading branch information
douglastofoli committed Mar 4, 2024
1 parent 26ff6da commit 3a3c70a
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 54 deletions.
2 changes: 1 addition & 1 deletion assets/css/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,12 @@ footer {
// Componentes
@import "./button.scss";
@import "./checkbox.scss";
@import "./flash.scss";
@import "./input.scss";
@import "./landing.scss";
@import "./navbar.scss";
@import "./radio.scss";
@import "./search.scss";
@import "./toast.scss";
@import "./textarea.scss";
@import "./tabela.scss";
@import "./label.scss";
Expand Down
72 changes: 72 additions & 0 deletions assets/css/flash.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
.flash-component {
display: inline-flex;
flex-direction: column-reverse;
position: fixed;
max-width: 25rem;
top: 1.5rem;
right: 1.5rem;
padding: 0.75rem;
align-items: flex-start;
gap: 0.75rem;
border-radius: 0.25rem;
background-color: #fff;

.flash {
@apply flex items-center;
gap: 0.75rem;


.flash-icon {
width: 1.5rem;
height: 1.5rem;
}

p {
@apply text-black-80;
}
}
}

.flash-component.success {
@apply border-2 border-solid border-green-40;

.flash-icon {
@apply text-green-100;
}
}

.flash-component.warning {
@apply border-2 border-solid border-yellow-40;

.flash-icon {
@apply text-yellow-100;
}
}

.flash-component.error {
@apply border-2 border-solid border-red-40;

.flash-icon {
@apply text-red-100;
}
}

.flash-component.show {
opacity: 1;
transform: translateY(0);
transition: opacity 200ms ease-in-out, transform 200ms ease-in-out;
}

#flash-group {
display: flex;
flex-direction: column;
position: fixed;
align-items: flex-end;
top: 1.5rem;
right: 1.5rem;
gap: 0.5rem;

.flash-component {
position: relative;
}
}
53 changes: 0 additions & 53 deletions assets/css/toast.scss

This file was deleted.

0 comments on commit 3a3c70a

Please sign in to comment.