react-router-navigation-confirm
Version:
A collection of components to display a custom confirmation dialog on navigation. More flexible solution to prevent than default react-router 'Prompt'
77 lines (64 loc) • 1.32 kB
CSS
.nc-modal {
left: 0px;
position: fixed;
top: 0px;
height: 100%;
width: 100%;
font-size: 16px;
font-family: Arial, Helvetica, sans-serif;
z-index: 10080;
}
.nc-modal__backdrop {
background-color: #000;
height: 100%;
left: 0;
opacity: 0.5;
position: fixed;
top: 0;
width: 100%;
z-index: 10080;
}
.nc-modal__content {
background-color: #FFF;
left: 0;
margin: 2rem auto;
max-width: 500px;
overflow-x: hidden;
overflow-y: auto;
position: relative;
top: 0;
width: 100%;
z-index: 10090;
border: 1px solid rgba(0, 0, 0, 0.3);
border-radius: 4px;
}
.nc-modal__body {
padding: 1rem;
}
.nc-modal__footer {
border-top: 1px solid #ECECEC;
padding: 1rem;
text-align: right;
}
.nc-modal__button {
background: #FAFAFA;
border: 1px solid #E1E1E1;
border-radius: 4px;
margin: 0 5px;
padding: 5px 15px;
font-size: 13px;
font-weight: bold;
}
.nc-modal__button:hover {
background: #DFDFDF;
cursor: pointer;
}
.nc-modal__button.confirm {
background: #4285F4;
border-color: #4472BE;
color: #FFF;
}
.nc-modal__button.confirm:hover {
background: #4479D1;
cursor: pointer;
}