Skip to content

Commit 1375b6a

Browse files
authored
Merge pull request #3311 from codecrafters-io/add-dark-mode-request-language-dropdown
style: add dark mode support to request language dropdown
2 parents 4b3605e + b79e111 commit 1375b6a

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

app/components/course-page/introduction-step/create-repository-card/request-language-dropdown.hbs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
<div class="w-60 border border-teal-500 shadow-sm rounded-sm bg-white overflow-hidden mb-2" data-test-request-language-dropdown>
2-
<div class="flex items-center px-3 text-gray-700 text-xs">
1+
<div
2+
class="w-60 border border-teal-500 dark:border-teal-400 shadow-sm rounded-sm bg-white dark:bg-gray-925 overflow-hidden mb-2"
3+
data-test-request-language-dropdown
4+
>
5+
<div class="flex items-center px-3 text-gray-700 dark:text-gray-300 text-xs">
36
{{! template-lint-disable require-input-label }}
47
<Input
58
@value={{this.searchQuery}}
69
placeholder={{if (gt this.requestedLanguages.length 0) "Change requested languages..." "Request languages..."}}
7-
class="py-2 text-gray-700 placeholder-gray-400 text-xs outline-hidden w-full"
10+
class="py-2 text-gray-700 dark:text-gray-300 placeholder-gray-400 dark:placeholder-gray-500 text-xs outline-hidden w-full"
811
{{did-insert this.handleInputDidInsert}}
912
/>
1013

@@ -18,14 +21,14 @@
1821
{{on-key "Escape" @onClose}}
1922
{{on-key "Enter" this.handleEnter}}
2023

21-
<div class="w-full h-px bg-gray-100"></div>
24+
<div class="w-full h-px bg-gray-100 dark:bg-white/10"></div>
2225

2326
<div class="text-xs overflow-y-auto h-28" {{did-insert this.handleSuggestionListDidInsert}}>
2427
{{#each this.languageSuggestions as |languageSuggestion index|}}
2528
<div
2629
role="button"
27-
class="flex items-center justify-between px-3 py-1.5 text-gray-700 hover:bg-gray-50
28-
{{if (eq index this.selectedSuggestionIndex) 'bg-gray-50'}}"
30+
class="flex items-center justify-between px-3 py-1.5 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700
31+
{{if (eq index this.selectedSuggestionIndex) 'bg-gray-50 dark:bg-gray-700'}}"
2932
{{on "mouseenter" (fn (mut this.selectedSuggestionIndex) index)}}
3033
{{on "click" (fn this.toggleLanguageSelection languageSuggestion.language)}}
3134
data-test-language-suggestion
@@ -40,15 +43,15 @@
4043
</div>
4144
</div>
4245
{{else}}
43-
<div class="px-3 py-3 text-gray-600">
46+
<div class="px-3 py-3 text-gray-600 dark:text-gray-400">
4447
<div class="mb-3 flex items-center">
4548
{{svg-jar "exclamation" class="w-4 h-4 mr-2 fill-current text-yellow-500"}}
4649
<div>No languages found.</div>
4750
</div>
4851

4952
<div>
5053
Can't find the language you're looking for?
51-
<a href="mailto:hello@codecrafters.io" class="font-bold underline text-teal-600">Let us know!</a>
54+
<a href="mailto:hello@codecrafters.io" class="font-bold underline text-teal-600 dark:text-teal-400">Let us know!</a>
5255
</div>
5356
</div>
5457
{{/each}}

app/components/course-page/introduction-step/create-repository-card/show-other-languages-button.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{{svg-jar "code" class="text-gray-400 h-6 fill-current group-hover:text-teal-500"}}
55
</div>
66

7-
<div class="text-base text-gray-700 group-hover:text-teal-500">
7+
<div class="text-base group-hover:text-teal-500">
88
Show Other Languages
99
</div>
1010
</div>

0 commit comments

Comments
 (0)