2, '(props: Omit<Omit<Pick<DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof HTMLAttributes<...>> & { ...; } & { ...; }, never> & Partial<...>, "theme"> & { ...; } & { ...; }): ReactElement<...>', gave the following error.
Type '{ '--depthlevel': number; }' is not assignable to type 'CSSProperties'.
Object literal may only specify known properties, and ''--depthlevel'' does not exist in type 'CSSProperties'.
Overload 2 of 2, '(props: StyledComponentPropsWithAs<"div", any, { depthLevel?: number | undefined; }, never, "div">): ReactElement<StyledComponentPropsWithAs<"div", any, { depthLevel?: number | undefined; }, never, "div">, string | JSXElementConstructor<...>>', gave the following error.
Type '{ '--depthlevel': number; }' is not assignable to type 'CSSProperties'.
Object literal may only specify known properties, and ''--depthlevel'' does not exist in type 'CSSProperties'.
подскажите, почему styled components ругаются на css vars?
Кажись только ручками расширить CSSProperties
я закостылил
style={{ ['--depthlevel' as any]: depthLevel }}>
Обсуждают сегодня