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

Fixes issue #1163 #1212

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Fixes issue #1163 #1212

wants to merge 7 commits into from

Conversation

mikkpokk
Copy link

More info: #1163

@DanielRiveraHQ
Copy link

Thanks @mikkpokk, hopefully we can get this merged soon

src/item.ts Outdated Show resolved Hide resolved
src/item.ts Outdated Show resolved Hide resolved
Related with dromru#1163

Keep in mind, usage actually stays the same. You can call `ref={ref}` as before.
@mikkpokk
Copy link
Author

Usage stays the same. You can use it as:

<Gallery>
    <Item key={key}
              original={item.original}
              thumbnail={item.thumbnail}
              width={item.width}
              height={item.height}>
            {({ref, open}) => {
                return (
                    <img src={item.thumbnail} ref={ref} />
                )
            }}
    </Item>
</Gallery>

OR

<Gallery>
    <Item key={key}
              original={item.original}
              thumbnail={item.thumbnail}
              width={item.width}
              height={item.height}>
            {({ref, open}) => {
                return (
                    <img src={item.thumbnail} ref={(node: HTMLImageElement) => {
                        // localCallback(node)
                        ref(node)
                    }} />
                )
            }}
    </Item>
</Gallery>

@codecov
Copy link

codecov bot commented Jul 20, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.05% 🎉

Comparison is base (3ed8b6b) 98.43% compared to head (4c6e9bb) 98.48%.
Report is 55 commits behind head on master.

❗ Current head 4c6e9bb differs from pull request most recent head ee20a0f. Consider uploading reports for the commit ee20a0f to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1212      +/-   ##
==========================================
+ Coverage   98.43%   98.48%   +0.05%     
==========================================
  Files          16       16              
  Lines         255      264       +9     
  Branches       54       57       +3     
==========================================
+ Hits          251      260       +9     
  Misses          4        4              
Files Changed Coverage Δ
src/item.ts 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mikkpokk
Copy link
Author

pages/deploy check failed due to permissions error. Please review.

@mikkpokk
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants