1.0.1 • Published 5 years ago
svelte-achieve-list v1.0.1
Svelte. List of achievements.
Screenshot
Install
npm install --save svelte-achieve-list
Example
Look at the example folder for a basic working example.
Usage
<!-- App.html -->
<AchieveList
endpoint={async () => {
return [
{
name: 'Achieve name',
icon: '/favicon.png',
description: '',
point: 100
}
]
}}>
<div slot="loading">...loading</div>
</AchieveList>
<script>
import AchieveList from 'svelte-achieve-list';
</script>
API
The achieve list component is the only export of the module.
import AchieveList from 'svelte-achieve-list'
Properties
Property | Default Value | Description |
---|---|---|
endpoint | undefined | The endpoint function with return of values |
nameProp | name | The key of name property in the object by endpoint. |
descProp | description | The key of description property in the object by endpoint |
pointProp | point | The key of point property in the object by endpoint. |
iconProp | icon | The key of icon property in the object by endpoint. |