reactjs-alert
Version:
reactjs-alert is a lightweight and customizable alert component for React.js applications. Easily create success, warning, error, or info alerts with a clean UI, custom colors, and auto-close functionality. Ideal for enhancing user notifications and impro
154 lines (139 loc) • 2.95 kB
CSS
.__myAlert * {
font-family: inherit;
}
.__myAlert {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
outline: 0;
opacity: 0;
visibility: hidden;
background: #0000001e;
z-index: 99999999 ;
transition: all 0.4s ease-in-out;
}
.__myAlert.show {
opacity: 1;
visibility: visible;
}
.__myAlertModal {
margin: auto;
position: absolute;
left: 50%;
top: 50%;
width: 100%;
max-width: 320px;
transform: translate(-50%, -50%);
background: #fff;
border-radius: 8px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.__myAlertModal .alert-wrapper {
max-width: 400px;
width: 100%;
height: auto;
margin: auto;
padding: 1.5em;
position: relative;
border-radius: 8px;
box-shadow: 0 3px 20px 2px #c5c5c5;
background-color: #fff;
}
.__myAlertModal .alert-wrapper .__alert-close-icon {
font-size: 24px;
width: 20px;
height: 20px;
padding: 0;
z-index: 999;
position: absolute;
right: 1.5rem;
top: 0.5rem;
color: #95969f;
font-weight: 400;
border: none;
line-height: 20px;
text-align: center;
cursor: pointer;
background: transparent;
transition: all 0.3s ease-in-out;
}
.__myAlertModal .alert-wrapper .__alert-close-icon:hover {
transform: scale(1.25);
}
.__myAlertModal .d-flex {
display: flex ;
align-items: center;
justify-content: flex-start;
}
.__myAlertModal .__alert-dialogue {
display: flex;
flex-direction: column;
}
.__myAlertModal .__alert-text {
margin: auto 0;
padding: 0;
font-family: inherit;
font-size: 1rem;
font-weight: 500;
font-stretch: normal;
font-style: normal;
line-height: normal;
letter-spacing: normal;
color: #262938;
position: relative;
text-align: left;
}
.__myAlertModal .alert-status-icon {
margin: 0;
width: 35px;
min-width: 35px;
margin-right: 12px;
}
.__myAlertModal .__close-alert-btn {
margin: 0;
padding: 4px;
border: none;
text-transform: capitalize;
width: auto;
height: 36px;
min-width: 120px;
font-family: inherit;
font-size: 14px;
font-weight: 600;
font-stretch: normal;
font-style: normal;
line-height: normal;
letter-spacing: 0.35px;
text-align: center;
color: #fff;
cursor: pointer;
border-radius: 8px;
margin-top: 1rem;
border: none;
background-color: #1d36ad;
transition: all 0.3s ease-in-out;
}
.__myAlertModal .close-alert-btn:hover {
transform: scale(1.025);
opacity: 0.75;
}
.__myAlertModal .__close-alert-btn:focus {
outline: none;
}
.__myAlertModal .__alert-quote {
font-size: 14px;
font-weight: 400;
font-stretch: normal;
font-style: italic;
line-height: 1.4;
letter-spacing: 0.08px;
color: #262938;
font-family: inherit;
margin: 1rem 0 0;
}
.__myAlertModal .mb-0 {
margin-bottom: 0;
}