Skip to content

Commit 00f88fa

Browse files
committed
Reorder options for more logical grouping
1 parent db47329 commit 00f88fa

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[![npm (scoped)](https://img.shields.io/npm/v/@zerodevx/svelte-toast)](https://www.npmjs.com/package/@zerodevx/svelte-toast)
22
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
33
[![Lines of code](https://img.shields.io/tokei/lines/github/zerodevx/svelte-toast?label=lines%20of%20code)](https://github.com/XAMPPRocky/tokei)
4-
[![Size minified](https://img.shields.io/bundlephobia/min/@zerodevx/svelte-toast@latest?label=minified)](https://bundlephobia.com/)
5-
[![Size gzipped](https://img.shields.io/bundlephobia/minzip/@zerodevx/svelte-toast@latest?label=gzipped)](https://bundlephobia.com/)
4+
[![Size minified](https://img.shields.io/bundlephobia/min/@zerodevx/svelte-toast?label=minified)](https://bundlephobia.com/)
5+
[![Size gzipped](https://img.shields.io/bundlephobia/minzip/@zerodevx/svelte-toast?label=gzipped)](https://bundlephobia.com/)
66

77
# svelte-toast
88

@@ -319,7 +319,7 @@ toast.set({ id, msg: 'Waddup!' })
319319
#### Pausable Toasts
320320

321321
Progress bar tweens can now be paused when the mouse cursor (on desktop) is hovered on the toast item.
322-
This behaviour by default is **disabled**. To enable, set option `pausable: true`:
322+
This behaviour by default is **disabled**. To enable, set option `pausable: true`.
323323

324324
```js
325325
toast.push('Hover me!', { pausable: true })
@@ -328,18 +328,18 @@ toast.push('Hover me!', { pausable: true })
328328
#### Send Svelte Component as a Message
329329

330330
To support complex UI or workflows, a Svelte component can be pushed instead of a standard message if
331-
you're using this package in a Svelte project. To do so, push options with `component` property defined:
331+
you're using this package in a Svelte project. To do so, push options with `component` defined:
332332

333333
```js
334334
import MyCustomSvelteComponent from './MyCustomSvelteComponent.svelte'
335335

336336
toast.push({
337337
component: {
338-
src: MyCustomSvelteComponent, // set the `src` to the component itself (required)
338+
src: MyCustomSvelteComponent, // set `src` to the component itself (required)
339339
props: { // optionally pass in `props` as key/value pairs
340340
...
341341
},
342-
sendIdTo: 'toastId' // optionally forward the toast id to `toastId` prop
342+
sendIdTo: 'toastId' // optionally forward toast id to `toastId` prop
343343
},
344344
... // any other toast options
345345
})
@@ -353,8 +353,8 @@ const options = {
353353
duration: 4000, // duration of progress bar tween to the `next` value
354354
initial: 1, // initial progress bar value
355355
next: 0, // next progress value
356+
pausable: false, // pause progress bar tween on mouse hover
356357
dismissable: true, // allow dismiss with close button
357-
pausable: false, // allow pause on mouse hover
358358
reversed: false, // insert new toast to bottom of stack
359359
intro: { x: 256 }, // toast intro fly animation settings
360360
theme: {} // css var overrides

src/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ declare module '@zerodevx/svelte-toast'
1111
* duration: 4000, // duration of progress bar tween to the `next` value
1212
* initial: 1, // initial progress bar value
1313
* next: 0, // next progress value
14+
* pausable: false, // pause progress bar tween on mouse hover
1415
* dismissable: true, // allow dismiss with close button
15-
* pausable: false, // allow pause on mouse hover
1616
* reversed: false, // insert new toast to bottom of stack
1717
* intro: { x: 256 }, // toast intro fly animation settings
1818
* theme: {} // css var overrides
@@ -27,8 +27,8 @@ export interface SvelteToastOptions {
2727
initial?: number
2828
next?: number
2929
progress?: number
30-
dismissable?: boolean
3130
pausable?: boolean
31+
dismissable?: boolean
3232
reversed?: boolean
3333
intro?: FlyParams
3434
theme?: { [key: string]: string }

src/stores.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ const defaults = {
44
duration: 4000,
55
initial: 1,
66
next: 0,
7-
dismissable: true,
87
pausable: false,
8+
dismissable: true,
99
reversed: false,
1010
intro: { x: 256 },
1111
theme: {}

0 commit comments

Comments
 (0)