mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-14 17:49:52 +00:00
Enhanced offline (#249)
* Notification of updates & reloading * Using version in service worker & allowing version to appear elsewhere * Stupid file * Ditching changelog for now. Using package json. * Ugh.
This commit is contained in:
@@ -8,12 +8,9 @@ export interface SnackOptions {
|
||||
function createSnack(message: string, options: SnackOptions): [Element, Promise<string>] {
|
||||
const {
|
||||
timeout = 0,
|
||||
actions = [],
|
||||
actions = ['dismiss'],
|
||||
} = options;
|
||||
|
||||
// Provide a default 'dismiss' action
|
||||
if (!timeout && actions.length === 0) actions.push('dismiss');
|
||||
|
||||
const el = document.createElement('div');
|
||||
el.className = style.snackbar;
|
||||
el.setAttribute('aria-live', 'assertive');
|
||||
|
||||
Reference in New Issue
Block a user