UNPKG

react-16-dropdown

Version:

A zero-dependency, lightweight and fully customizable dropdown (not select) for React.

90 lines (74 loc) 1.39 kB
.react-16-dropdown, .trigger { display: inline-block; } .trigger-renderer { border-radius: 3px; line-height: 1.5; padding: .375rem .75rem; cursor: pointer; background: #ffffff; font-size: 1rem; border: 1px solid #dcdcdc; } .trigger-renderer:hover { background: #f0f0f0; } /*********************** Menu styles begin ***********************/ .menu { position: absolute; background: white; border: 1px solid #dcdcdc; border-radius: 3px; margin-top: 8px; min-width: 300px; max-width: 420px; box-shadow : 0 0 10px -5px #000000; } .menu-section { border-bottom: 1px solid #dcdcdc; border-top: 1px solid #dcdcdc; } .menu-section:first-of-type { border-top: 0; } .menu-section:last-of-type { border-bottom: 0; } .menu-section + .menu-section { border-top: 0; } .menu-section__title { font-size: 1rem; padding: .5rem; font-weight: bold; } .menu-section-title:empty { padding: 0; } .menu-section-title:empty + .menu-section { border-top: 0; } .menu:focus { /* outline: none */ } /*********************** Menu styles end ***********************/ .option { min-height: 24px; padding: 8px 16px; } .option.focused, .option:hover { background: #f0f0f0; cursor: pointer; } .option:focus { border: 10px solid pink; } .option.disabled { opacity: 0.5; background: #f0f0f0; } .option.disabled:hover { cursor: no-drop; }