@arashaltafi/react-toast
Version:
react toast library
112 lines (97 loc) • 1.94 kB
CSS
.main-toast {
position: fixed;
top: 32px;
right: 48px;
display: flex;
align-items: center;
justify-content: center;
gap: 20px;
border: 1px solid;
border-radius: 16px;
padding: 16px 20px;
z-index: 40;
transition: all 1s ease-in-out;
}
@media screen and (max-width: 480px) {
.main-toast {
top: 12px;
right: 8px;
}
}
.success-state {
border-color: #86EFAC;
background-color: #F0FDF4;
}
.error-state {
border-color: #FCA5A5;
background-color: #FEF2F2;
}
.translate-x-999 {
transform: translateX(999px);
}
.body-toast {
width: 280px;
font-size: 16px;
line-height: 32px;
font-weight: 500;
}
@media screen and (max-width: 480px) {
.body-toast {
width: 200px;
font-size: 14px;
line-height: 28px;
}
}
.text-error {
color: #DC2626
}
.text-success {
color: #16A34A
}
.cursor-pointer {
cursor: pointer
}
.main-tooltip {
position: relative;
display: inline-block;
}
.body-tooltip {
position: absolute;
width: 240px;
z-index: 10;
padding: 8px 12px;
border-radius: 8px;
background-color: #F0F9FF;
color: #1F2937;
text-align: center;
transition-property: opacity;
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
transition-duration: 150ms;
transition-duration: 300ms;
bottom: 100%;
left: 50%;
transform: translateX(-50%);
margin-bottom: 12px;
}
.icon-tooltip {
position: absolute;
top: 100%;
left: 50%;
transform: translateX(-50%);
margin-top: -4px;
width: 18px;
height: 18px;
}
.text-tooltip {
text-align: start;
font-size: 12px;
font-weight: 500;
line-height: 24px;
color: #1F2937;
}
.opacity-100 {
opacity: 100;
}
.opacity-0 {
opacity: 0;
}