Skip to content

Commit

Permalink
feat: use new antd notification provider (#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
alicanerdurmaz authored Oct 16, 2023
1 parent 5b2c92a commit c31bd2d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 12 deletions.
10 changes: 7 additions & 3 deletions refine-nextjs/plugins/antd/extend.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
const base = {
_app: {
refineProps: ["notificationProvider={notificationProvider}"],
import: ['import "@refinedev/antd/dist/reset.css";'],
refineProps: ["notificationProvider={useNotificationProvider}"],
import: [
`import { App as AntdApp } from "antd"`,
'import "@refinedev/antd/dist/reset.css";',
],
refineAntdImports: [
"notificationProvider",
"useNotificationProvider",
"ThemedLayoutV2",
"ThemedSiderV2",
],
wrapper: [
[`<ColorModeContextProvider>`, `</ColorModeContextProvider>`],
[`<AntdApp>`, `</AntdApp>`],
],
localImport: [
`import { Header } from "@components/header"`,
Expand Down
7 changes: 4 additions & 3 deletions refine-react/plugins/antd/extend.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
const base = {
_app: {
import: [],
import: [`import { App as AntdApp } from "antd"`],
refineImports: [],
refineAntdImports: ["notificationProvider", "ThemedLayoutV2"],
refineProps: ["notificationProvider={notificationProvider}"],
refineAntdImports: ["useNotificationProvider", "ThemedLayoutV2"],
refineProps: ["notificationProvider={useNotificationProvider}"],
wrapper: [
[`<ColorModeContextProvider>`, `</ColorModeContextProvider>`],
[`<AntdApp>`, `</AntdApp>`],
],
localImport: [
`import { ColorModeContextProvider } from "./contexts/color-mode";`,
Expand Down
10 changes: 7 additions & 3 deletions refine-remix/plugins/antd/extend.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
const base = {
_app: {
refineProps: ["notificationProvider={notificationProvider}"],
import: ['import resetStyle from "@refinedev/antd/dist/reset.css";'],
refineAntdImports: ["notificationProvider"],
refineProps: ["notificationProvider={useNotificationProvider}"],
import: [
`import { App as AntdApp } from "antd"`,
'import resetStyle from "@refinedev/antd/dist/reset.css";',
],
refineAntdImports: ["useNotificationProvider"],
styleImport: ['{ rel: "stylesheet", href: resetStyle }'],
wrapper: [
[`<ColorModeContextProvider>`, `</ColorModeContextProvider>`],
[`<AntdApp>`, `</AntdApp>`],
],
localImport: [`import { ColorModeContextProvider } from "@contexts";`],
},
Expand Down
7 changes: 4 additions & 3 deletions refine-vite/plugins/antd/extend.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
const base = {
_app: {
import: [],
import: [`import { App as AntdApp } from "antd"`],
refineImports: [],
refineAntdImports: [
"notificationProvider",
"useNotificationProvider",
"ThemedLayoutV2",
"ThemedSiderV2",
],
refineProps: ["notificationProvider={notificationProvider}"],
refineProps: ["notificationProvider={useNotificationProvider}"],
wrapper: [
[`<ColorModeContextProvider>`, `</ColorModeContextProvider>`],
[`<AntdApp>`, `</AntdApp>`],
],
localImport: [
`import { ColorModeContextProvider } from "./contexts/color-mode";`,
Expand Down

0 comments on commit c31bd2d

Please sign in to comment.