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

fix(gatsby): Add bodyComponent to replaceRenderer args #28456

Merged
merged 3 commits into from
Dec 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/gatsby/cache-dir/api-ssr-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* rendering.
* @param {object} $0
* @param {string} $0.pathname The pathname of the page currently being rendered.
* @param {ReactNode} $0.bodyComponent The React element to be rendered as the page body
* @param {function} $0.replaceBodyHTMLString Call this with the HTML string
* you render. **WARNING** if multiple plugins implement this API it's the
* last plugin that "wins". TODO implement an automated warning against this.
Expand Down
3 changes: 2 additions & 1 deletion packages/gatsby/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,7 @@ export interface RenderBodyArgs extends NodePluginArgs {

export interface ReplaceRendererArgs extends NodePluginArgs {
replaceBodyHTMLString: (str: string) => void
bodyComponent: React.ReactNode
setHeadComponents: (comp: React.ReactNode[]) => void
setHtmlAttributes: (attr: ReactProps<HTMLHtmlElement>) => void
setBodyAttributes: (attr: ReactProps<HTMLBodyElement>) => void
Expand Down Expand Up @@ -1285,7 +1286,7 @@ export interface Actions {
traceId?: string
): void

printTypeDefinitions (
printTypeDefinitions(
path?: string,
include?: { types?: Array<string>; plugins?: Array<string> },
exclude?: { types?: Array<string>; plugins?: Array<string> },
Expand Down