File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
packages/website/src/components Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export default component$(() => {
15
15
const appState = useContext ( APP_STATE ) ;
16
16
const menuOpenSignal = useSignal ( false ) ;
17
17
18
- const toggleMenu = $ ( ( ) => {
18
+ const toggleMenu$ = $ ( ( ) => {
19
19
menuOpenSignal . value = ! menuOpenSignal . value ;
20
20
} ) ;
21
21
@@ -32,7 +32,7 @@ export default component$(() => {
32
32
< button
33
33
type = "button"
34
34
aria-label = "Toggle navigation"
35
- onClick$ = { toggleMenu }
35
+ onClick$ = { toggleMenu$ }
36
36
class = "block lg:hidden"
37
37
>
38
38
{ menuOpenSignal . value ? < CloseIcon /> : < MenuIcon /> }
@@ -41,7 +41,7 @@ export default component$(() => {
41
41
< aside class = "fixed top-0 left-0" >
42
42
< div class = "fixed h-screen w-screen bg-gray-900/20 backdrop-blur-sm" > </ div >
43
43
< div class = "fixed h-screen w-80 overflow-y-scroll bg-white dark:bg-slate-800" >
44
- < Menu onClose = { toggleMenu } />
44
+ < Menu onClose$ = { toggleMenu$ } />
45
45
</ div >
46
46
</ aside >
47
47
) }
Original file line number Diff line number Diff line change @@ -4,10 +4,10 @@ import { APP_STATE } from '../../constants';
4
4
import { CloseIcon } from '../icons/CloseIcon' ;
5
5
6
6
type Props = {
7
- onClose ?: PropFunction < ( ) => void > ;
7
+ onClose$ ?: PropFunction < ( ) => void > ;
8
8
} ;
9
9
10
- export const Menu = component$ < Props > ( ( { onClose } ) => {
10
+ export const Menu = component$ < Props > ( ( { onClose$ } ) => {
11
11
const appState = useContext ( APP_STATE ) ;
12
12
const menu = [
13
13
{ label : 'Button' , path : `/docs/${ appState . theme . toLowerCase ( ) } /button` } ,
@@ -28,17 +28,18 @@ export const Menu = component$<Props>(({ onClose }) => {
28
28
] ;
29
29
30
30
const onChangePage = $ ( ( ) => {
31
- if ( onClose ) {
32
- onClose ( ) ;
31
+ if ( onClose$ ) {
32
+ onClose$ ( ) ;
33
33
}
34
34
} ) ;
35
35
36
36
return (
37
37
< div class = "px-4 py-4" >
38
38
< div class = "flex items-center justify-between" >
39
39
< h4 class = "text-2xl" > Documentation</ h4 >
40
- { onClose && (
41
- < h5 onClick$ = { onClose } >
40
+ { onClose$ && (
41
+ // eslint-disable-next-line qwik/valid-lexical-scope
42
+ < h5 onClick$ = { onClose$ } >
42
43
< CloseIcon />
43
44
</ h5 >
44
45
) }
You can’t perform that action at this time.
0 commit comments