这是indexloc提供的服务,不要输入任何密码
Skip to content

Adding a button that triggers a function onClick in Caption (pswp-caption-content) #19

@MATTiVOLTARii

Description

@MATTiVOLTARii

Nice Work with PhotoSwipe!
I want to include a button in the caption that executes a function when clicked. Unfortunately, the "onClick" is not being executed.

<div className="pswp-caption-content">                    
                    <button onClick={() => handlerClick()}>Click</button>                      
                      <div>
                        <Text size="xl" weight={700}>
                          Lorem ipsum dolor (1933)
                        </Text>
                      </div>
                      Color photograph 12 x 10
                    </div>

Does anyone have an idea of how it could work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions