Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

195
Views
Type '(CSSProperties | undefined)[]' is not assignable to type 'Properties<string | number, string & {}>'

I have very simple tsx component like this

import React, { CSSProperties } from "react";

const INPUT: CSSProperties = {
  display: "flex",
  flexDirection: "row",
};
const TEXT_INPUT: CSSProperties = {
  fontWeight: "bold",
  marginRight: "10px",
};
const CONTAINER: CSSProperties = {
  alignItems: "center",
  justifyContent: "center",
  display: "flex",
};
export interface AddNoteInterface {
  style?: CSSProperties;
}
export default function AddNote(props: AddNoteInterface) {
  const { style } = props;
  return (
    <div style={[CONTAINER, style]}>.  <----- ts complaint here
      <div style={INPUT}>
        <div style={TEXT_INPUT}>Text input</div>
        <input />
      </div>
    </div>
  );
}

but when i use array for multi style, it give me error :

Type 'CSSProperties[]' is not assignable to type 'Properties<string | number, string & {}>'.
  Types of property 'filter' are incompatible.

What happen??? Please help, thank you a lots

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!