Skip to content
This repository has been archived by the owner on Jan 15, 2025. It is now read-only.

modal suggestion list styling #1349

Merged
merged 1 commit into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions src/common/components/suggestion-list/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,70 @@
}
}
}

.modal-suggestion-list {
display: block;
left: 0;
top: 100%;
width: 100%;
box-shadow: $box-shadow;
z-index: 100;
border-radius: $border-radius;
min-width: 200px;

@include themify(day) {
background: $white;
}

@include themify(night) {
background: lighten($dark-six, 5);
}

.list-header {
padding: 8px 20px;
font-weight: 500;
background: $dark-sky-blue;
color: $white;
border-top-left-radius: $border-radius;
border-top-right-radius: $border-radius;
}

.list-body {
max-height: 200px;
overflow-x: auto;

.list-item {
padding: 8px 20px;
cursor: pointer;
display: flex;
align-items: center;
white-space: nowrap;

&:last-child {
border-bottom-left-radius: $border-radius;
border-bottom-right-radius: $border-radius;
}

@include themify(day) {
color: $warm-grey;

&:hover,
&:focus {
background: lighten($dark-sky-blue, 10);
color: $white;
}
}

@include themify(night) {
color: $silver;

&:hover,
&:focus {
background: $metallic-blue;
color: $white;
}
}
}
}
}
}
2 changes: 1 addition & 1 deletion src/common/components/suggestion-list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export default class SuggestionList extends Component<Props> {
<ClickAwayListener onClickAway={() => this.setState({ showList: false })}>
{showList && modeItems && modeItems?.length > 0 ? modeItemsUI : <></>}
{showList && !modeItems && items.length > 0 ? (
<div className="suggestion-list">
<div className="modal-suggestion-list">
{header && <div className="list-header">{header}</div>}
<div className="list-body">
{items.map((x, i) => {
Expand Down