1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-22 22:59:39 +02:00

Add notification UI (#449)

* Add notification UI

* Make animation an aribtrary value

It didn't make much sense in the theme as it feels very specific, this
change also means the timing information is clearer within the html
itself.

* Update to use tailwind theme

* Refactor structure of icon

* Add support for multiple notifications at once

* Adjust notification animation timing

* Make notification more accessible

Applies role to the notification which will apply the appropriate
aria-live status to ensure notifications are read out when they are
rendered into the screen for screenreader users.

Wraps the svg with a button tag that keyboard users can focus and engage
with to close the notification.

* Fix notification progress indicator placement

* Map flash types to notification types automatically

* Refine notification animations

* Set success as default icon for notifications
This commit is contained in:
Josh Brown 2024-02-13 15:19:11 +00:00 committed by GitHub
parent bbe7323ca4
commit 101a5ee0c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 51 additions and 0 deletions

View file

@ -0,0 +1,9 @@
import { Controller } from '@hotwired/stimulus'
// Connects to data-controller="element-removal"
export default class extends Controller {
remove() {
this.element.remove()
}
}