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

190
Views
El tipo '(CSSProperties | undefined)[]' no se puede asignar al tipo 'Properties<string | número, cadena & {}>'

Tengo un componente tsx muy simple como este

 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> ); }

pero cuando uso una matriz para varios estilos, me da un error:

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

¿¿¿Qué sucedió??? Ayuda por favor, muchas gracias

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!