-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: wrap ReactImgix with props HOFs
This commit wraps all the ReactImgix components with the higher order functions that process and merge the Providers props with the Component props. This simplifies the usage of the ImgixContext wrapper for the user. As the HOF will apply the context and merge its props with the user's imgix Component props behind the scenes. In brief, this makes it so the user only needs to worry about adding the ImgixContext component.
- Loading branch information
Showing
3 changed files
with
15 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from "./shouldComponentUpdateHOC"; | ||
export * from "./imgixProvider" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
import ReactImgix, { Picture, Source } from "./react-imgix"; | ||
import { PublicConfigAPI } from "./config"; | ||
|
||
import { buildURLPublic as buildURL } from "./constructUrl"; | ||
export { buildURL }; | ||
import { | ||
ImgixProvider, | ||
} from "./HOCs" | ||
|
||
export default ReactImgix; | ||
export { ImgixProvider }; | ||
export { buildURL }; | ||
export { Picture, Source, PublicConfigAPI }; | ||
|
||
export { Background } from "./react-imgix-bg"; | ||
export default ReactImgix; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters