-
Notifications
You must be signed in to change notification settings - Fork 270
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
nuxt-picture: allow parsing format as array #886
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Daniel Roe <[email protected]>
✅ Live Preview ready!
|
👷 Deploy request for nuxt-image pending review.Visit the deploys page to approve it
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me overall.
Extra ⭐ for the docs! :-)
Could you address the failing type checks? (pnpm test:types
)
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #886 +/- ##
==========================================
+ Coverage 89.15% 89.34% +0.19%
==========================================
Files 44 44
Lines 2914 2967 +53
Branches 323 328 +5
==========================================
+ Hits 2598 2651 +53
Misses 315 315
Partials 1 1
☔ View full report in Codecov by Sentry. |
@@ -109,3 +118,47 @@ export const useBaseImage = (props: ExtractPropTypes<typeof baseImageProps>) => | |||
modifiers | |||
} | |||
} | |||
|
|||
export const useBasePicture = (props: ExtractPropTypes<typeof basePictureProps>) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For simplicity and reduced bundle size, do you think we can avoid splitting out useBasePicture
and instead override the props directly in nuxt-img
?
To better align the image format prop with the global setting for format, I now allow parsing an array as prop as well. Also minor tweaks to the docs and tests.