Я только что попытался получить доступ к теме в своих собственных стилевых компонентах, таких как:
const ToolbarPlaceholder = styled('div')((theme: any) => ({
minHeight: theme.mixins.toolbar.minHeight,
}));
Я получил это из документа: https://material -ui.com / customization / css-in-js / # styled-components-api-15-lines- (в конце страницы )
Но я получаю следующую ошибку типа:
Argument of type '(theme: any) => { minHeight: any; }' is not assignable to parameter of type 'TemplateStringsArray'.
Property 'raw' is missing in type '(theme: any) => { minHeight: any; }'.
Чего не хватает? И какой тип имеет theme
параметр?