Switch to single page application #2
1 changed files with 6 additions and 7 deletions
|
@ -2,11 +2,10 @@ import happyx
|
|||
|
||||
component NavButton:
|
||||
text: string
|
||||
path: string
|
||||
|
||||
path: cstring = "/"
|
||||
`template`:
|
||||
tLi(class="list-item cursor-pointer text-white mx-2 my-2 ring-1 ring-white/20 hover:ring-white/50 rounded"):
|
||||
tButton:
|
||||
{self.text}
|
||||
@click:
|
||||
route({self.path})
|
||||
tLi(class="list-item cursor-pointer text-white mx-2 my-2 ring-1 ring-white/20 hover:ring-white/50 rounded"):
|
||||
tButton:
|
||||
{self.text}
|
||||
@click:
|
||||
route self.path
|
Loading…
Add table
Reference in a new issue