I'm using React 16.8 with Typescript "@zeit/next-typescript": "1.1.0"
I have inline-style interface. And There is object using IInputInlineStyle interface.
interface IInputInlineStyle {
padding: string;
textAlign?: string;
paddingLeft?: string | number;
color?: string;
}
const inputInlineStyle: IInputInlineStyle = {
padding,
textAlign
};
But I got this error message.
Error:(155, 21) TS2322: Type 'IInputInlineStyle' is not assignable to type 'CSSProperties'.
Types of property 'textAlign' are incompatible.
Type 'string' is not assignable to type 'TextAlignProperty'.
How can I fix this problem?