Skip to content

[Docs] EuiAccordion props table#5974

Merged
thompsongl merged 6 commits intoelastic:mainfrom
thompsongl:hotfix/accordion-props
Jun 27, 2022
Merged

[Docs] EuiAccordion props table#5974
thompsongl merged 6 commits intoelastic:mainfrom
thompsongl:hotfix/accordion-props

Conversation

@thompsongl
Copy link
Copy Markdown
Contributor

@thompsongl thompsongl commented Jun 15, 2022

Summary

Provide EuiAccordionProps as the withEuiTheme generic to allow the props table to populate correctly.

export const EuiAccordion = withEuiTheme<EuiAccordionProps>(EuiAccordionClass);

Checklist

@thompsongl thompsongl added the skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation) label Jun 15, 2022
@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_5974/

@thompsongl
Copy link
Copy Markdown
Contributor Author

Probably going to use the !!prop-loader! method after #6000 merges

@cee-chen
Copy link
Copy Markdown
Contributor

cee-chen commented Jun 27, 2022

@thompsongl you don't need a separate prop file for class components with withEuiTheme. All EuiAccordion needs is this in its export:

export const EuiAccordion = withEuiTheme<EuiAccordionProps>(EuiAccordionClass);

Tested locally and both props table and playground work as expected. There's an extra ref prop at the bottom of the table but it's kind of whatever (IMO)

@thompsongl
Copy link
Copy Markdown
Contributor Author

🙇 Thanks for the assist, @constancecchen!

@thompsongl thompsongl marked this pull request as ready for review June 27, 2022 19:50
Copy link
Copy Markdown
Contributor

@cee-chen cee-chen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 looks good to me!

Copy link
Copy Markdown
Contributor

@1Copenut 1Copenut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@thompsongl thompsongl enabled auto-merge (squash) June 27, 2022 20:07
@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_5974/

@thompsongl thompsongl merged commit 48db5bb into elastic:main Jun 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants