interface SomeDiv{
width: number | string;
....
}
我正在尝试将带有样式组件的打字稿使用。
const SomeDiv = styled.div<SomeDiv>`
height: 100%;
min-width: 0;
grid-column-end: ${({ width = 1 }): string => `span ${width}`};
grid-row-end: ${({ height = 1 }): string => `span ${height}`};
${({ order }): string => order && `order: ${order}`}
${({ horizontal }): string => horizontal && `grid-column-start: ${horizontal}`}
我遇到此错误:
Property 'horizontal' does not exist on type
'Pick<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
"slot" | "style" | "title" | ... 251 more ... | "is"> & { ...; } & ThemeProps<...>'