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

7
app/components/app-links.imba

@ -228,4 +228,9 @@ tag app-links
<app-bang data=active_bang> <app-bang data=active_bang>
else else
for link, index in state.sorted_links 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