Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how can I click picture and enlarge it? #764

Closed
4 tasks done
lush-99 opened this issue Aug 28, 2023 · 2 comments
Closed
4 tasks done

how can I click picture and enlarge it? #764

lush-99 opened this issue Aug 28, 2023 · 2 comments
Labels
🙋 no/question This does not need any changes 👎 phase/no Post cannot or will not be acted on

Comments

@lush-99
Copy link

lush-99 commented Aug 28, 2023

Initial checklist

Problem

image
i want to click this picture and enlarge it, what can i do? help me please

Solution

enlarge this picture when i click it

Alternatives

tell me how to do

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Aug 28, 2023
@remcohaszing
Copy link
Member

You can use the components prop to pass a custom img component.

function ClickableImage(props) {
  function handleClick(event) {
    // Handle the click event here.
    console.log(props)
  }

  return <img {...props} onClick={handleClick} />
}

const components = {
  img: ClickableImage
}

// …

<ReactMarkdown
  components={components}
  // …
/>

@remcohaszing remcohaszing added the 🙋 no/question This does not need any changes label Aug 28, 2023
@github-actions
Copy link

Hi! Thanks for reaching out! Because we treat issues as our backlog, we close issues that are questions since they don’t represent a task to be completed.

See our support docs for how and where to ask questions.

Thanks,
— bb

@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙋 no/question This does not need any changes 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

2 participants