-
Notifications
You must be signed in to change notification settings - Fork 64
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
feat: expose url builder api #225
Conversation
README.md
Outdated
@@ -22,7 +22,7 @@ A [React](https://facebook.github.io/react/) component that renders images using | |||
- [Lazy Loading](#lazy-loading) | |||
- [Low Quality Image Placeholder Technique (LQIP)](#low-quality-image-placeholder-technique-lqip) | |||
- [Picture support](#picture-support) | |||
- [Background mode](#background-mode) | |||
- [Background mode](#background-mode) - [Custom URLS](#custom-urls) |
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.
[nit] Needs a newline here
const actualURL = new URL(actual); | ||
expect(actualURL.searchParams.get("w")).toBe("450"); | ||
expect(actualURL.searchParams.get("h")).toBe("100"); | ||
}); |
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.
Can we add a test here to ensure that the parameter override behavior outlined in the README is adhered to?
…imgix into fred/expose-url-api * 'fred/expose-url-api' of https://github.com/imgix/react-imgix: chore(deps): update dependency webpack to v4.26.0 (#226) chore(deps): update react monorepo to v16.6.3 (#223) chore(deps): update dependency prettier to v1.15.2 (#222)
…imgix into fred/expose-url-api * 'fred/expose-url-api' of https://github.com/imgix/react-imgix: Sync with Prettier
@jayeb this should be good to go now 😄 |
Description
This PR exposes a pure function
buildURL
which allows users to generate imgix URLs directly, for instance, if they want to use the url to set the background of a custom DIV, they can accomplish that with this feature.Fixes #131
New Feature
feat(<area>): added new way to do this cool thing #issue-number
Steps to Test
Review new unit tests.