react-global-search
Version:
react global search
127 lines (106 loc) • 2.34 kB
CSS
.rgs-search-input {
width: 100%;
height: 40px;
border: 1px solid #ccc;
border-radius: 4px;
padding: 0 10px;
box-sizing: border-box;
font-size: 14px;
outline: none;
transition: border-color 0.3s ease-in-out;
}
.rgs-search-input:focus {
border-color: #40a9ff;
}
.rgs-items-container{
max-height: 400px;
overflow-y: auto;
margin-top: 10px;
}
.rgs-items-container::-webkit-scrollbar {
width: 6px;
}
.rgs-items-container::-webkit-scrollbar-thumb {
background-color: #ccc;
border-radius: 3px;
}
.rgs-items-container::-webkit-scrollbar-track {
background-color: #fff;
}
.rgs-one-item {
background-color: transparent;
cursor: pointer;
display: inline-flex;
align-items: center;
padding: 5px 10px;
box-sizing: border-box;
width: 100%;
font-size: 20px;
/* transition: background-color 0.1s ease-in-out; */
border-radius: 4px;
margin-bottom: 5px;
}
.rgs-highlighted-item {
background-color: black;
color: white;
}
.rgs-item-icon {
margin-right: 10px;
justify-content: center;
}
.rgs-item-name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.rgs-item-description{
font-size: 16px;
}
.rgs-item-divider {
margin: 5px 0;
border-bottom: 1px solid #eee;
}
/* ---------------------- Modal ----------------------------- */
.rgs-modal-mask {
position: fixed;
z-index: 9999;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: opacity 0.3s ease-in-out;
pointer-events: none;
}
.rgs-modal-mask-open {
opacity: 1;
pointer-events: visible;
}
.rgs-modal-container {
position: absolute;
background-color: #fff;
border-radius: 4px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.33);
/* padding: 5px 20px; */
width: 500px;
max-width: 95%;
box-sizing: border-box;
top: 8%;
}
.rgs-modal-header {
padding: 10px 20px;
font-size: 20px;
font-weight: 500;
margin-bottom: 10px;
border-bottom: 1px solid #eee;
}
.rgs-modal-body {
margin: 0px 20px 10px 20px;
margin-bottom: 10px;
max-height: calc(100vh - 200px);
overflow-y: auto;
}