This commit is contained in:
@@ -12,14 +12,17 @@ func Notifications(notifications []*models.Notification) g.Node {
|
||||
return nil
|
||||
}
|
||||
return h.Div(
|
||||
h.Class("fixed flex flex-col gap-2 bottom-0 right-0 p-2 sm:p-4 text-white dark:text-black"),
|
||||
h.Class("fixed flex flex-col gap-2 bottom-0 right-0 text-white dark:text-black"),
|
||||
g.Group(sliceutils.Map(notifications, notificationNode)),
|
||||
)
|
||||
}
|
||||
|
||||
func notificationNode(n *models.Notification) g.Node {
|
||||
return h.Div(
|
||||
h.Class("bg-gray-600 dark:bg-gray-400 px-4 py-2 rounded-lg shadow-lg w-64 animate-notification"),
|
||||
h.P(g.Text(n.Content)),
|
||||
h.Class("p-2 sm:p-4 animate-notification"),
|
||||
h.Div(
|
||||
h.Class("bg-gray-600 dark:bg-gray-400 px-4 py-2 rounded-lg shadow-lg w-64"),
|
||||
g.Text(n.Content),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user