UNPKG

@mantine/notifications

Version:

Mantine notifications system

23 lines (22 loc) 630 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 export { getGroupedNotifications, positions }; //# sourceMappingURL=get-grouped-notifications.mjs.map