Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

196
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda