Skip to content

Commit

Permalink
Change show/showToast timeout defaults, and showToast closeButton def…
Browse files Browse the repository at this point in the history
…aults, for warning/error toasts
  • Loading branch information
domenic committed Jul 19, 2019
1 parent d18982a commit 36276a0
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -383,10 +383,13 @@ TODO: when we have a prototype, link to/show an example of this in action.
- `.show(options)`: shows the toast element,
by toggling its `open=""` attribute to true.
It will also start or reset the timeout of the toast,
to show for the provided `duration`,
or a default `duration` of `3000`ms.
to show for the provided `duration`.
The `options` include:
- `duration`: how long to show the toast, in milliseconds. Defaults to `3000`.
- `duration`: how long to show the toast,
in milliseconds.
If not provided,
the default will be `Infinity` for `type="warning"` or `type="error"` toasts,
and `3000` otherwise.
- `multiple`: ???
- `newestOnTop`: ???

Expand Down Expand Up @@ -433,12 +436,14 @@ allowing further manipulation by script.
as well as the options for this particular showing of the toast.
Thus, the possible options are:

- `type`, like the property that reflects the `type=""` attribute
- `position`, like the property that reflects the `position=""` attribute
- `closeButton`, like the property that reflects the `closebutton=""` attribute
- `duration`, like the `show()` option
- `multiple`, like the `show()` option
- `newestOnTop`, like the `show()` option
- `type`, like the property that reflects the `type=""` attribute.
- `position`, like the property that reflects the `position=""` attribute.
- `closeButton`, like the property that reflects the `closebutton=""` attribute.
Defaults to `true` if `duration` is `Infinity`,
including if it defaults to infinity by setting `type` to `"warning"` or `"error"`.
- `duration`, like the `show()` option.
- `multiple`, like the `show()` option.
- `newestOnTop`, like the `show()` option.
- `action`, an `Element` or string.
An `Element` is treated the same as the `action` property setter.
Otherwise,
Expand Down

0 comments on commit 36276a0

Please sign in to comment.