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

[EuiPageTemplate] Fix ignored component prop #6352

Merged
merged 5 commits into from
Nov 8, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
exports[`EuiPageTemplate _EuiPageInnerProps is rendered 1`] = `
<div
class="euiPageTemplate emotion-euiPageOuter-row-grow"
component="main"
style="min-block-size:max(460px, 100vh)"
>
<main
<div
class="customClassName emotion-euiPageInner-left"
id="customID"
/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/page_template/page_template.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe('EuiPageTemplate', () => {
test('_EuiPageInnerProps is rendered', () => {
const component = render(
<EuiPageTemplate
component="main"
breehall marked this conversation as resolved.
Show resolved Hide resolved
component="div"
contentBorder={true}
panelled={false}
mainProps={{ id: 'customID', className: 'customClassName' }}
Expand Down
2 changes: 2 additions & 0 deletions src/components/page_template/page_template.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export const _EuiPageTemplate: FunctionComponent<EuiPageTemplateProps> = ({
panelled,
// Inner props
contentBorder,
component,
mainProps,
// Outer props
className,
Expand Down Expand Up @@ -205,6 +206,7 @@ export const _EuiPageTemplate: FunctionComponent<EuiPageTemplateProps> = ({

<EuiPageInner
{...mainProps}
component={component}
id={pageInnerId}
border={innerBordered()}
panelled={innerPanelled()}
Expand Down