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

184
Views
¿Cómo mostrar un Modal una vez que se hace clic en ShowMoreClick?
<OneProfileKeyCard title="Qualification" showMoreText="See all qualifications" onShowMoreClick={() => console.log('show more')} > Creating, communicating, and implementing the organization&apos;s vision, mission, and overall direction Leading the development and implementation of the overall organization&apos;s strategy. </OneProfileKeyCard>
 import React from 'react' import './OneProfileKeyCard.scss' type Props = { title: string showMoreText: string onShowMoreClick: () => void } export const OneProfileKeyCard: React.FC<Props> = ({ title, showMoreText, onShowMoreClick, children }) => ( <div className="one-profile-key-card"> <h3>{ title }</h3> <div> { children } </div> <button type="button" onClick={onShowMoreClick}> { showMoreText } </button> </div> )

¿Alguien podría ayudarme a configurar un modal? Estoy tratando de configurar un modal una vez que se hace clic en ShowMoreClick que convertiría a los niños (creando, comunicando e implementando la organización...) en un modal. Hasta ahora se ve así: ingrese la descripción de la imagen aquí

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Deberá tener un estado administrado en el componente principal desde donde se llama al componente secundario OneProfileKeyCard .

Algo como esto

 const Parent = () => { const [modalOpen, setModalOpen] = React.useState(false) return ( <div> <h1>Demo</h1> <OneProfileKeyCard title="Qualification" showMoreText="See all qualifications" onShowMoreClick={() => setModalOpen(!modalOpen)}> text ... text </OneProfileKeyCard> </div> ) }

No estoy seguro de qué más hay dentro de sus componentes, pero luego necesitará una forma de cerrar el modelo, en este momento configuré el accesorio showMoreClick para abrir/cerrar, pero si eso debería abrirse, configúrelo en true y haga un paso similar para una función false de cierre.

about 4 years ago · Juan Pablo Isaza 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!