Type '{ |cssProperties|}' is not assignable to type 'Properties' in React

https://stackoverflow.com/questions/69195076/type-cssproperties-is-not-assignable-to-type-propertiesstring-number

It's a little mismatch in typing of TypeScript. You would need to add CSSProperties interface for the style object.

import { CSSProperties } from "react";

const linkStyle: CSSProperties = {
  color: "#8954A8",
  fontWeight: "bold",
  fontSize: 16,
  verticalAlign: "5%" 

};

 

Không có nhận xét nào:

StaticImage

  import React , { useEffect , useRef } from "react" import { StaticImage } from "gatsby-plugin-image" impor...