use svelte shorthand wherever possible (#242)
This commit is contained in:
parent
c4182c9ddc
commit
8229d1c9e6
|
@ -1,6 +1,6 @@
|
|||
<a rel="nofollow noopener"
|
||||
target="_blank"
|
||||
href={{href}}
|
||||
:href
|
||||
aria-label={{ariaLabel || ''}}
|
||||
class="{{className || ''}} {{showIcon ? 'external-link-with-icon' : ''}} {{normalIconColor ? 'normal-icon-color' : ''}}">
|
||||
<slot></slot>{{#if showIcon}}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
aria-hidden={{ariaHidden}}
|
||||
alt={{alt || ''}}
|
||||
title={{alt || ''}}
|
||||
src={{src}}
|
||||
:src
|
||||
on:imgLoad
|
||||
on:imgLoadError />
|
||||
{{else}}
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
/>
|
||||
{{else}}
|
||||
<img
|
||||
src={{src}}
|
||||
width={{width}}
|
||||
height={{height}}
|
||||
:src
|
||||
:width
|
||||
:height
|
||||
alt={{description || ''}}
|
||||
title={{description || ''}}
|
||||
/>
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<div class="pseudo-virtual-list" on:initialized ref:node>
|
||||
{{#each wrappedItems as wrappedItem, i @item}}
|
||||
<PseudoVirtualListLazyItem
|
||||
component={{component}}
|
||||
:component
|
||||
index={{i}}
|
||||
length={{wrappedItems.length}}
|
||||
makeProps={{makeProps}}
|
||||
:makeProps
|
||||
key={{wrappedItem.item}}
|
||||
intersectionObserver={{intersectionObserver}}
|
||||
:intersectionObserver
|
||||
isIntersecting={{isIntersecting(wrappedItem.item, $intersectionStates)}}
|
||||
isCached={{isCached(wrappedItem.item, $intersectionStates)}}
|
||||
height={{getHeight(wrappedItem.item, $intersectionStates)}}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<li class="search-result">
|
||||
<a href={{href}} class="search-result-anchor">
|
||||
<a :href class="search-result-anchor">
|
||||
<slot></slot>
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<SearchResult href="/statuses/{{status.id}}">
|
||||
<Status :index :length
|
||||
timelineType="search" timelineValue="search"
|
||||
status={{status}} />
|
||||
:status />
|
||||
</SearchResult>
|
||||
<style>
|
||||
</style>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
{{#each $visibleItems as visibleItem @key}}
|
||||
<VirtualListLazyItem :component
|
||||
offset={{visibleItem.offset}}
|
||||
makeProps={{makeProps}}
|
||||
:makeProps
|
||||
key={{visibleItem.key}}
|
||||
index={{visibleItem.index}}
|
||||
/>
|
||||
|
|
Loading…
Reference in New Issue