Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[system] Polish @mui/material-nextjs #40473

Merged
merged 2 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions packages/mui-material-nextjs/src/v13-appRouter/appRouterV13.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
'use client';
import * as React from 'react';
import createCache from '@emotion/cache';
import { useServerInsertedHTML } from 'next/navigation';
import createCache, { EmotionCache, Options as OptionsOfCreateCache } from '@emotion/cache';
import { CacheProvider as DefaultCacheProvider } from '@emotion/react';
import type { EmotionCache, Options as OptionsOfCreateCache } from '@emotion/cache';
Copy link
Member Author

@oliviertassinari oliviertassinari Jan 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate import.

import { useServerInsertedHTML } from 'next/navigation';

export type AppRouterCacheProviderProps = {
/** These are the options passed to createCache() from 'import createCache from "@emotion/cache"' */
/**
* These are the options passed to createCache() from 'import createCache from "@emotion/cache"'.
*/
options?: Partial<OptionsOfCreateCache> & {
/**
* If `true`, the generated styles are wrapped within `@layer mui`.
* This is useful if you want to override the Material UI's generated styles with different styling solution, like Tailwind, plain CSS etc.
* This is useful if you want to override the Material UI's generated styles with different styling solution, like Tailwind CSS, plain CSS etc.
*/
enableCssLayer?: boolean;
};
/** By default <CacheProvider /> from 'import { CacheProvider } from "@emotion/react"' */
/**
* By default <CacheProvider /> from 'import { CacheProvider } from "@emotion/react"'.
*/
CacheProvider?: (props: {
value: EmotionCache;
children: React.ReactNode;
Expand Down
1 change: 0 additions & 1 deletion packages/mui-material-nextjs/src/v13-appRouter/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
'use client';
export { default as AppRouterCacheProvider } from './appRouterV13';
export * from './appRouterV13';
1 change: 0 additions & 1 deletion packages/mui-material-nextjs/src/v14-appRouter/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
'use client';
export * from '../v13-appRouter';
Loading