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:
parent
bbe7323ca4
commit
101a5ee0c5
5 changed files with 51 additions and 0 deletions
9
app/javascript/controllers/element_removal_controller.js
Normal file
9
app/javascript/controllers/element_removal_controller.js
Normal 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()
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue