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$(() => {
1515 const appState = useContext ( APP_STATE ) ;
1616 const menuOpenSignal = useSignal ( false ) ;
1717
18- const toggleMenu = $ ( ( ) => {
18+ const toggleMenu$ = $ ( ( ) => {
1919 menuOpenSignal . value = ! menuOpenSignal . value ;
2020 } ) ;
2121
@@ -32,7 +32,7 @@ export default component$(() => {
3232 < button
3333 type = "button"
3434 aria-label = "Toggle navigation"
35- onClick$ = { toggleMenu }
35+ onClick$ = { toggleMenu$ }
3636 class = "block lg:hidden"
3737 >
3838 { menuOpenSignal . value ? < CloseIcon /> : < MenuIcon /> }
@@ -41,7 +41,7 @@ export default component$(() => {
4141 < aside class = "fixed top-0 left-0" >
4242 < div class = "fixed h-screen w-screen bg-gray-900/20 backdrop-blur-sm" > </ div >
4343 < div class = "fixed h-screen w-80 overflow-y-scroll bg-white dark:bg-slate-800" >
44- < Menu onClose = { toggleMenu } />
44+ < Menu onClose$ = { toggleMenu$ } />
4545 </ div >
4646 </ aside >
4747 ) }
Original file line number Diff line number Diff line change @@ -4,10 +4,10 @@ import { APP_STATE } from '../../constants';
44import { CloseIcon } from '../icons/CloseIcon' ;
55
66type Props = {
7- onClose ?: PropFunction < ( ) => void > ;
7+ onClose$ ?: PropFunction < ( ) => void > ;
88} ;
99
10- export const Menu = component$ < Props > ( ( { onClose } ) => {
10+ export const Menu = component$ < Props > ( ( { onClose$ } ) => {
1111 const appState = useContext ( APP_STATE ) ;
1212 const menu = [
1313 { label : 'Button' , path : `/docs/${ appState . theme . toLowerCase ( ) } /button` } ,
@@ -28,17 +28,18 @@ export const Menu = component$<Props>(({ onClose }) => {
2828 ] ;
2929
3030 const onChangePage = $ ( ( ) => {
31- if ( onClose ) {
32- onClose ( ) ;
31+ if ( onClose$ ) {
32+ onClose$ ( ) ;
3333 }
3434 } ) ;
3535
3636 return (
3737 < div class = "px-4 py-4" >
3838 < div class = "flex items-center justify-between" >
3939 < 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$ } >
4243 < CloseIcon />
4344 </ h5 >
4445 ) }
You can’t perform that action at this time.
0 commit comments