UNPKG

@mantine/notifications

Version:

Mantine notifications system

24 lines (23 loc) 673 B
"use client"; //#region packages/@mantine/notifications/src/get-grouped-notifications/get-grouped-notifications.ts const positions = [ "bottom-center", "bottom-left", "bottom-right", "top-center", "top-left", "top-right" ]; function getGroupedNotifications(notifications, defaultPosition) { return notifications.reduce((acc, notification) => { acc[notification.position || defaultPosition].push(notification); return acc; }, positions.reduce((acc, item) => { acc[item] = []; return acc; }, {})); } //#endregion exports.getGroupedNotifications = getGroupedNotifications; exports.positions = positions; //# sourceMappingURL=get-grouped-notifications.cjs.map