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

235
Views
Abrir enlace en una nueva pestaña cuando se hace clic en el botón

Quiero que se abra en una nueva pestaña cuando se haga clic en el enlace de mi botón de saludo, ¿cómo puedo obtenerlo?

Mi código:

 <Button href="https://play.google.com/store/apps/dev?id=6411367502435954294" type="primary" content="Play Store 🛒" />

Todo el código:

 import styles from "./contact.module.scss"; import Button from "../Button/Button"; import Social from "../Social/Social"; const Contact = () => { return ( <div className={styles.contactWrapper}> <div className={styles.socialWrapper}> <Social media="linkedin" href="https://www.linkedin.com/in/nisaefendioglu/" /> <Social media="github" href="https://github.com/nisaefendioglu" /> <Social media="twitter" href="https://twitter.com/nisaefendioglu" /> </div> <div className={styles.buttonWrapper}> <Button href="https://play.google.com/store/apps/dev?id=6411367502435954294" type="primary" content="Play Store 🛒" /> <Button href="mailto:nisaefendioglu0@gmail.com" type="secondary" content="Contact" icon={"paper-plane"} /> </div> </div> ); }; export default Contact;

SCSS

 .buttonWrapper { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, 20rem); justify-content: center; align-items: center; gap: var(--medium-space); }

Botón :

 import styles from "./button.module.scss"; const Button = ({ content, icon, type, href }) => { return ( <> <a className={`${styles.button} ${ type === "primary" ? styles.primaryButton : styles.secondaryButton }`} href={href} > <i className={`fas fa-${ icon }`}></i> {content} </a> </> ); }; export default Button;
about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

CÓDIGO ACTUALIZADO

Agrega un atributo target="_blank"

 <Button target="_blank" href="https://play.google.com/store/apps/dev?id=6411367502435954294" type="primary" content="Play Store 🛒" > {/*some code*/} </Button>; import styles from "./button.module.scss"; /* Include additional prop target in your button component */ const Button = ({ content, icon, type, href, target }) => { return ( <> <a target={target} className={`${styles.button} ${ type === "primary" ? styles.primaryButton : styles.secondaryButton }`} href={href} > <i className={`fas fa-${icon}`}></i> {content} </a> </> ); }; export default Button;
about 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!