Browse Source

refactor

main
familyfriendlymikey 2 years ago
parent
commit
731cf7a46e
  1. 10
      app/components/app-link.imba
  2. 7
      app/components/app-links.imba

10
app/components/app-link.imba

@ -1,15 +1,13 @@
tag app-link
def render
<self>
css d:flex fld:row jc:space-between ai:center
px:16px py:11px rd:5px cursor:pointer c:blue3
<.link
@pointerover=(selection_index = index)
<self
@pointerover=set_selection_index(index)
@click.prevent=handle_click_link(link)
.selected=(index is selection_index)
>
css d:flex fld:row jc:space-between ai:center
px:16px py:11px rd:5px cursor:pointer c:blue3
<.link-left>
css d:flex fl:1

7
app/components/app-links.imba

@ -228,4 +228,9 @@ tag app-links
<app-bang data=active_bang>
else
for link, index in state.sorted_links
<app-link data=link index=index>
<app-link
data=link
set_selection_index=(do |index| selection_index = index)
index=index
selection_index=selection_index
>

Loading…
Cancel
Save