-
Notifications
You must be signed in to change notification settings - Fork 184
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
tech: add vkui-nextjs-ts
example
#8404
base: master
Are you sure you want to change the base?
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
size-limit report 📦
|
👀 Docs deployed
Commit d12705e |
e2e tests
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Комменты см. #8402 (review)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
интересно, почему в папке vkui-nextjs-ts
corepack добавляет packageManager
при yarn install
, а в vkui-vite-ts
не выставляет 🤔
<html lang="ru" suppressHydrationWarning> | ||
<head> | ||
<title>NextJS + VKUI + TS</title> | ||
<meta |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nextjs форсит задавать метатэги через объект, иначе дубли будут, в данном случае вот это лучше заюзать?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Заюзал
<Flex direction="column" justify="center" className={styles.layout}> | ||
<FixedLayout vertical="top"> | ||
<Flex justify="end" className={styles.header}> | ||
<Flex.Item>{colorSchemeSwitcher}</Flex.Item> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<Flex.Item>{colorSchemeSwitcher}</Flex.Item> | |
{colorSchemeSwitcher} |
}; | ||
|
||
export const useColorSchemeSwitcher = (): [ColorSchemeType, React.ReactNode] => { | ||
const defaultColorScheme = useColorScheme(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А зачем этот хук тут юзать? Сейчас в шаблоне получается сломано автоопределение темы (потому что мы всегда будем форсить светлую)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Да, ошибся здесь. Поправил - добавил отдельную обертку с ColorSchemeProvider
Описание
Необходимо добавить шаблон для приложения с использованием
Next js + VKUI + TypeScript
, чтобы пользователям было удобнее начинать использоватьVKUI
Изменения
Next js + VKUI + TypeScript
с небольшой версткой и возможностью изменения цветовой схемы приложенияПроект можно глянуть через CodeSandbox
Release notes
Документация
Next js + VKUI + TypeScript