Skip to content

Commit

Permalink
alert/react: add title
Browse files Browse the repository at this point in the history
  • Loading branch information
sevfurneaux committed Feb 5, 2025
1 parent 4e93a96 commit 174a637
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion adhocracy4/static/Alert.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useRef, useEffect } from 'react'
import django from 'django'

const Alert = ({ type = 'info', message, onClick, timeInMs }) => {
const Alert = ({ type = 'info', title, message, onClick, timeInMs }) => {
const timer = useRef()
const closeTag = django.gettext('Close')

Expand Down Expand Up @@ -30,6 +30,7 @@ const Alert = ({ type = 'info', message, onClick, timeInMs }) => {
aria-atomic="true"
>
<div className="alert__content">
{title && <h3 className="alert__headline">{title}</h3>}
{message}
{onClick && (
<button
Expand Down

0 comments on commit 174a637

Please sign in to comment.