[BUG] notification type is not respected in @refinedev/antd and @refinedev/mantine
Describe the bug
The type field passed to useNotification().open() ("success" | "error" | "progress") is not correctly rendered by two of the UI packages:
@refinedev/antd: the notification provider passes type into antd's notification.open({ ...}) call, but antd's open() API has no type option — it's silently dropped. As a result, every non-progress notification renders with no icon and no color, regardless of whether it's a success or error. @refinedev/mantine: the notification provider uses color: type === "success" ? "primary" : "red", which treats any non-"success" type (including "error" but really anything else) as red/error styling with no distinct handling.
Separately, this also intersects with #6326: type is required and restricted to "success" | "error" | "progress", so there's no way to show a plain/neutral notification without a @ts-expect-error hack.
Steps To Reproduce
- Set up a refine app using @refinedev/antd (or @refinedev/mantine) as the UI package.
- Call const { open } = useNotification(); open({ message: "Test", type: "success" }).
- Observe the rendered notification.
Expected behavior
In antd: a success notification should render with the green checkmark icon/color antd normally applies via notification.success(). In mantine: "error" and any other non-success type should not all collapse into the same red styling — each type should have distinct styling.
Packages
@refinedev/core, @refinedev/antd, @refinedev/mantine
Additional Context
I have a patch ready that fixes both provider issues (switches antd to use the notificationtype shortcut methods, adds a proper color/icon map in mantine) and, while touching this code, also widens OpenNotificationParams.type to include "info" | "warning" and makes it optional — which would resolve #6326 as a side effect. Happy to open a PR referencing this issue.
Source: refinedev/refine