use svelte shorthand wherever possible (#242)

This commit is contained in:
Nolan Lawson 2018-04-29 18:42:03 -07:00 committed by GitHub
parent c4182c9ddc
commit 8229d1c9e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 11 deletions

View file

@ -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}}

View file

@ -3,7 +3,7 @@
aria-hidden={{ariaHidden}}
alt={{alt || ''}}
title={{alt || ''}}
src={{src}}
:src
on:imgLoad
on:imgLoadError />
{{else}}

View file

@ -15,9 +15,9 @@
/>
{{else}}
<img
src={{src}}
width={{width}}
height={{height}}
:src
:width
:height
alt={{description || ''}}
title={{description || ''}}
/>

View file

@ -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)}}

View file

@ -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>

View file

@ -1,7 +1,7 @@
<SearchResult href="/statuses/{{status.id}}">
<Status :index :length
timelineType="search" timelineValue="search"
status={{status}} />
:status />
</SearchResult>
<style>
</style>

View file

@ -7,7 +7,7 @@
{{#each $visibleItems as visibleItem @key}}
<VirtualListLazyItem :component
offset={{visibleItem.offset}}
makeProps={{makeProps}}
:makeProps
key={{visibleItem.key}}
index={{visibleItem.index}}
/>