inventaire / inventaire-client

webapp coupled to the inventaire server :books:
https://inventaire.io
49 stars 16 forks source link

Improve flash display #313

Closed jum-s closed 2 years ago

jum-s commented 2 years ago

original motivation is in the first commit, for accessibility purposes

one may want to test display by pasting the following in a svelte component

let errorTest = {
  type: 'error',
  message: I18n('Lorem ipsum dolor sit amet, consectetur adipisicing elit.')
}
let warningTest = {
  type: 'warning',
  message: I18n('Lorem ipsum dolor sit amet, consectetur adipisicing elit.')
}
let infoTest = {
  type: 'info',
  message: I18n('Lorem ipsum dolor sit amet, consectetur adipisicing elit.')
}
let successTest = {
  type: 'success',
  message: I18n('Lorem ipsum dolor sit amet, consectetur adipisicing elit.')
}

and

<Flash bind:state={flashLang}/>
<Flash bind:state={errorTest}/>
<Flash bind:state={warningTest}/>
<Flash bind:state={infoTest}/>
<Flash bind:state={successTest}/>