'Convert React.CSSProperties to NestedCSSProperties of TypeStyle
After updating some react libraries, I am seeing new errors with using typestyle which used to work good.
const ReactFlexStyle: React.CSSProperties = {
display: 'flex',
justifyContent: 'flex-start',
alignItems: 'center'
};
import { style } from 'typestyle';
const wrapper = style(...ReactFlexStyle, {
$debugName: `prefix`,
$unique: false,
})
wrapper no longer compiles because style expects NestedCSSProperties from typestyle
// type definition of style from typestyle
export declare const style: {
(...objects: (types.NestedCSSProperties | undefined)[]): string;
(...objects: (false | types.NestedCSSProperties | null | undefined)[]): string;
};
One solution is to update all existing React.CSSProperties to NestedCSSProperties. Am wondering if there is an easier solution than updating all code base.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
