Closed warren-bank closed 4 months ago
I added a way to import it in the @next
release and will be included in full releases going forward. That file is internal stuff so I'm not going to add it to the docs and can't promise that it won't be modified in the future. It's unlikely to be though.
pnpm install bigger-picture@next
import { prefersReducedMotion, closing } from 'bigger-picture/svelte/stores'
console.log('prefersReducedMotion', prefersReducedMotion)
closing.subscribe((bool) => {
console.log('gallery is closing', bool)
})
Let me know if that doesn't work for you. It does require svelte to be installed.
Looks good to me. Thanks :smiley:
Your
BiggerPictureThumbnails
demo component needs to importstores.js
.However,
package.json
prevents directly importing this file from the npm package.My request is for the default export for svelte to include an export for
stores
.Specifically:
src/bigger-picture.js
...which would allow a user to create a custom component (such as
BiggerPictureThumbnails
) with the import: