小编You*_*mic的帖子

如何在 next 13 中使用 mantine UI

我试图使用 app 目录将 mantine UI 与 NextJS 13 一起使用,我必须将所有内容包装在MantineProvider组件中,但我不知道将其放在哪里。

我试过这个

布局.js

/* eslint-disable @next/next/no-head-element */
import { MantineProvider } from '@mantine/core';
export default function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <MantineProvider
    withGlobalStyles
    withNormalizeCSS
    theme={{
      /** Put your mantine theme override here */
      colorScheme: 'dark',
    }}>
      <html>
        <head></head>
        <body>{children}</body>
      </html>
    </MantineProvider>
    
  );
}
Run Code Online (Sandbox Code Playgroud)

而且没有效果,请问有什么解决办法吗??

reactjs next.js mantine

10
推荐指数
1
解决办法
9737
查看次数

标签 统计

mantine ×1

next.js ×1

reactjs ×1