【发布时间】:2022-02-01 11:44:28
【问题描述】:
我有这个组件,但我不能将主题与打字稿一起使用
const buttonDisabled = css`
color: ${({ theme }) => theme.color};
`;
如何输入这个组件?
error: No overload matches this call.
Overload 1 of 2, '(template: TemplateStringsArray, ...args: CSSInterpolation[]): SerializedStyles', gave the following error.
Argument of type '({ theme }: { theme: any; }) => any' is not assignable to parameter of type 'CSSInterpolation'.
Type '({ theme }: { theme: any; }) => any' is missing the following properties from type 'CSSInterpolation[]': pop, push, concat, join, and 28 more.
【问题讨论】:
标签: javascript reactjs typescript next.js emotion