Skip to content

Commit d316443

Browse files
authored
Adding Light Theme and Correcting Overflow
I added the ligth theme because it didn't exist and fixed the overflow of the options
1 parent b2cb5b1 commit d316443

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

packages/core/src/components/discord-string-select-menu/DiscordStringSelectMenu.ts

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { css, html, LitElement } from 'lit';
22
import { customElement, eventOptions, property } from 'lit/decorators.js';
33
import { classMap } from 'lit/directives/class-map.js';
44
import ExpandMore from '../svgs/ExpandMore.js';
5+
import { messagesLightTheme } from '../discord-messages/DiscordMessages.js';
6+
import { consume } from '@lit/context';
57

68
@customElement('discord-string-select-menu')
79
export class DiscordStringSelectMenu extends LitElement {
@@ -30,8 +32,20 @@ export class DiscordStringSelectMenu extends LitElement {
3032
font-weight: 500;
3133
}
3234
35+
:host([light-theme]) .discord-string-select-menu {
36+
background-color: #EBEBEB !important;
37+
border-color: #D9D9D9 !important;
38+
color: #2e3338;
39+
}
40+
41+
:host([light-theme]) .discord-string-select-menu-option-slot {
42+
background-color: #EBEBEB !important;
43+
border-color: #D9D9D9 !important;
44+
color: #2e3338;
45+
}
46+
3347
.discord-string-select-menu-option-slot {
34-
overflow-y: scroll;
48+
overflow-y: auto;
3549
overflow-x: hidden;
3650
color: currentColor;
3751
border: none;
@@ -59,7 +73,7 @@ export class DiscordStringSelectMenu extends LitElement {
5973
}
6074
6175
.discord-string-select-menu-option-slot::-webkit-scrollbar-track {
62-
background-color: none;
76+
background-color: transparent;
6377
}
6478
6579
.discord-string-select-menu-option-slot::-webkit-scrollbar-thumb {
@@ -113,6 +127,10 @@ export class DiscordStringSelectMenu extends LitElement {
113127
@property({ attribute: 'placeholder' })
114128
public accessor placeholder: string = 'Make a selection';
115129

130+
@consume({ context: messagesLightTheme })
131+
@property({ type: Boolean, reflect: true, attribute: 'light-theme' })
132+
public accessor lightTheme = false;
133+
116134
protected override render() {
117135
return html`
118136
<div class="${classMap({ 'discord-string-select-menu': true, 'discord-string-select-menu-disabled': this.disabled })}">

0 commit comments

Comments
 (0)