Reactjs typescript错误属性';分区';不存在于类型';默认主题的类型';
我现在第一次使用typescript并开始了玩具项目 但一开始,它已经精疲力竭了 下面是我的代码:Reactjs typescript错误属性';分区';不存在于类型';默认主题的类型';,reactjs,typescript,styled-components,Reactjs,Typescript,Styled Components,我现在第一次使用typescript并开始了玩具项目 但一开始,它已经精疲力竭了 下面是我的代码: import styled,{css}来自“styled components”; 导出常量卡=styled.div` ${({theme})=>css` 背景色:${theme.colors.white}; 边界半径:15px; 显示器:flex; 弹性:1; 弯曲方向:立柱; 最大高度:适合的内容; 填充:13px; `} `; 但错误消息如下所示: 如何更改代码 请帮忙 嗨,你看了这个吗
import styled,{css}来自“styled components”;
导出常量卡=styled.div`
${({theme})=>css`
背景色:${theme.colors.white};
边界半径:15px;
显示器:flex;
弹性:1;
弯曲方向:立柱;
最大高度:适合的内容;
填充:13px;
`}
`;
但错误消息如下所示:
如何更改代码
请帮忙 嗨,你看了这个吗?嗨,你看了这个吗?