Спасибо
WbICHA , по проблеме где нет автозаполнения пользовательских вариантов в стоке, проблема в пути декларирования.
Нужно это:
declare module '@mui/material/Typography/Typography' {
interface TypographyPropsVariantOverrides extends Record<CustomVariants, true> {}
}
Вместо этого:
declare module '@mui/material/Typography' {
interface TypographyPropsVariantOverrides extends Record<CustomVariants, true> {}
}
В StoryBook не видит расширенных типов, так как и не смотрит в d.ts. Помогло в конфиге .storybook/main.ts:
// ...
reactDocgenTypescriptOptions: {
include: [
'**/**.tsx',
'src/themes/typography/typography.types.d.ts',
],
tsconfigPath: '../tsconfig.json',
// ...