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

188
Views
¿Cómo hacer que la parte en negrita del texto se pase del objeto al componente de reacción?

Esta es la página html donde creo el objeto. Parte de la descripción debe estar en negrita:

 const agencyProps = {
 title: "Managed agency selection",
 paragraph: "Strengten your onboarding process",
 videoImage: {
 src: "/img/video.png",
 alt: "background",
 width: 330,
 height: 520,
 },

 selections: {
 cardOne: {
 title: "Brief",
 bold: "THIS",
 description: `Complete brief or simple guidance on what to include, we've got you covered`,
 width: "430px",
 },

 cardTwo: {
 title: "Search",
 description:
 "In-depth agency search covering, criteria matching, door knocking and due-dilligence vetting.",
 width: "460px",
 },

 cardThree: {
 title: "Pitch",
 description:
 "Comprehensive pitch management, including comms, diary management and pitch hosting.",
 width: "490px",
 },
 },
};

Este es el componente, donde paso la propiedad del objeto:

 <StyledCard style={{ maxWidth: `${selections.cardTwo.width}` }}>
 <StyledIconWrapper>
 <FaSearch size="1x" color="#0f0f0f" />
 </StyledIconWrapper>
 <StyledTitleDescriptionWrapper>
 <StyledSelectTitle>
 {selections.cardTwo.title}
 </StyledSelectTitle>
 <StyledSelectDescription>
 {selections.cardTwo.description}
 </StyledSelectDescription>
 </StyledTitleDescriptionWrapper>
 </StyledCard>

Intenté poner en <b></b> la parte que me gusta, intenté hacer getter y usar "esto" con la propiedad 'negrita', pero aún no puedo captar las words que me gusta que estén en negrita.{ ***} ¡Espero que la explicación esté bien y gracias de antemano!

almost 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Una forma es envolver el texto para que esté en negrita en una etiqueta <strong> , por ejemplo:

 cardOne: { 
 description: "This text is <strong>bold</strong>.",
 title: // ...
 width: // ...
}
almost 4 years ago · Santiago Trujillo Report

0

tienes que usar la etiqueta <strong> <strong/> y pasarla a dangerouslySetInnerHTML más información en esta página

almost 4 years ago · Santiago Trujillo Report

0

Puede agregar etiquetas <strong> o <b> alrededor de la parte de la descripción que desea resaltar.

 cardOne: {
 title: "Brief",
 description: `Complete brief or <b>simple guidance</b> on what to include, we've got you covered`,
 width: "430px"
 };

Luego puede representar la descripción con dangerouslySetInnerHTML .

 <p dangerouslySetInnerHTML={{ __html: cardOne.description }} />
almost 4 years ago · Santiago Trujillo Report
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!