File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " svelte-theme-select" ,
3
- "version" : " 0.0.8 " ,
3
+ "version" : " 0.0.9 " ,
4
4
"type" : " module" ,
5
5
"keywords" : [
6
6
" svelte" ,
Original file line number Diff line number Diff line change 11
11
// this is to prevent the drop down style changing as it disappears
12
12
let pending: Theme | undefined = undefined
13
13
14
- function select (event : Event ) {
14
+ function change (event : Event ) {
15
15
const { detail } = event as CustomEvent
16
16
const { selected } = detail
17
- pending = selected
17
+ if (selected ) {
18
+ pending = selected
19
+ menu .close ()
20
+ }
18
21
}
19
22
20
23
function closed() {
27
30
</script >
28
31
29
32
<div class =" relative inline-block" >
30
- <button class ="w-6 h-6 leading-none" on:select ={ select } use:menu .button >
33
+ <button class ="w-6 h-6 leading-none" use:menu .button on:change ={ change } >
31
34
<span hidden ={$theme === ' system' }>
32
35
<span class ="dark:hidden inline" >{@html theme .icons .light (true )}</span >
33
36
<span class ="hidden dark:inline" >{@html theme .icons .dark (true )}</span >
You can’t perform that action at this time.
0 commit comments