fix: исправлены разногласия в документации
- Заменён .scss на .css в разделе Компоненты - Заменён globals.css на ./styles/index.css в layout.tsx - Провайдеры вынесены в app/providers/ вместо инлайн-импорта - Обновлён quickfix.biome на source.fixAll.biome (Biome 2.x) - Breakpoints и радиусы оставлены без изменений (36/62/82em, --radius-1/2)
This commit is contained in:
@@ -830,7 +830,7 @@ const parse = (value: any) => value;
|
||||
"editor.defaultFormatter": "biomejs.biome",
|
||||
"editor.formatOnSave": true,
|
||||
"editor.codeActionsOnSave": {
|
||||
"quickfix.biome": "explicit",
|
||||
"source.fixAll.biome": "explicit",
|
||||
"source.organizeImports.biome": "explicit"
|
||||
},
|
||||
"files.associations": {
|
||||
@@ -845,7 +845,7 @@ const parse = (value: any) => value;
|
||||
|---|---|---|
|
||||
| `editor.defaultFormatter` | `biomejs.biome` | Biome используется как единственный форматтер для всех файлов |
|
||||
| `editor.formatOnSave` | `true` | Код автоматически форматируется при каждом сохранении |
|
||||
| `codeActionsOnSave.quickfix.biome` | `explicit` | Biome автоматически применяет безопасные исправления при сохранении |
|
||||
| `codeActionsOnSave.source.fixAll.biome` | `explicit` | Biome автоматически применяет безопасные исправления при сохранении |
|
||||
| `codeActionsOnSave.source.organizeImports.biome` | `explicit` | Импорты сортируются и группируются автоматически при сохранении |
|
||||
| `files.associations` | `"*.css": "postcss"` | Все CSS-файлы открываются с подсветкой PostCSS вместо стандартного CSS |
|
||||
|
||||
@@ -1022,7 +1022,7 @@ src/
|
||||
```text
|
||||
container/
|
||||
├── styles/
|
||||
│ └── container.module.scss
|
||||
│ └── container.module.css
|
||||
├── types/
|
||||
│ └── container.interface.ts
|
||||
├── container.tsx
|
||||
@@ -1031,7 +1031,7 @@ container/
|
||||
|
||||
### Пример базового компонента
|
||||
|
||||
`styles/container.module.scss`
|
||||
`styles/container.module.css`
|
||||
```scss
|
||||
.root {}
|
||||
```
|
||||
@@ -1054,7 +1054,7 @@ export interface ContainerProps extends HTMLAttributes<HTMLDivElement> {}
|
||||
import type { FC } from 'react'
|
||||
import cl from 'clsx'
|
||||
import type { ContainerProps } from './types/container.interface'
|
||||
import styles from './styles/container.module.scss'
|
||||
import styles from './styles/container.module.css'
|
||||
|
||||
/**
|
||||
* Контейнер с адаптивной максимальной шириной.
|
||||
@@ -1117,9 +1117,8 @@ export { Container } from './container'
|
||||
```tsx
|
||||
import type { PropsWithChildren } from 'react'
|
||||
import type { Metadata } from 'next'
|
||||
import { ColorSchemeScript, MantineProvider } from '@mantine/core'
|
||||
import '@mantine/core/styles.css'
|
||||
import './globals.css'
|
||||
import { Providers } from './providers'
|
||||
import './styles/index.css'
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: {
|
||||
@@ -1149,13 +1148,10 @@ export const metadata: Metadata = {
|
||||
export default function RootLayout({ children }: PropsWithChildren) {
|
||||
return (
|
||||
<html lang="ru" suppressHydrationWarning>
|
||||
<head>
|
||||
<ColorSchemeScript />
|
||||
</head>
|
||||
<body>
|
||||
<MantineProvider>
|
||||
<Providers>
|
||||
{children}
|
||||
</MantineProvider>
|
||||
</Providers>
|
||||
</body>
|
||||
</html>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user