title: how to pass style in div using typescript in react
body: <p>this is my code i just want to make a custom component in react with typescript like if i want to pass height, width, border Radius and style as extra parameter like if i want more css property then pass style={{display:flex}} but i can't add this with typescript i successfully write in js it works but not familiar with typescript</p>
  
  <p>my interface</p>
  
  <pre><code>interface BoxProps {
      heights: React.CSSProperties;
      styles?: React.CSSProperties;
      className?: String;
      borderRadius?: React.CSSProperties
      children?: React.ReactElement&lt;any&gt;
  }
  
  const Box = ({ id, heights, styles, className, children }: BoxProps) =&gt; {
      const Nstyle = { ...styles,height: { heights } }
      return (
          &lt;div
              {...id}
              style={Nstyle}
              className={CN} &gt;
              {children}
          &lt;/div &gt;
      );
  }
  </code></pre>
  
  <p>please help style shows this error with typescript
  <code>The expected type comes from property 'style' which is declared here on type</code>'DetailedHTMLProps, HTMLDivElement>'`</p>