-
Notifications
You must be signed in to change notification settings - Fork 842
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
Added component prop to EuiPageBody #2410
Conversation
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.
Some small stuff. Once you fix, LGTM.
CHANGELOG.md
Outdated
@@ -4,6 +4,7 @@ | |||
- Added new `EuiColorStops` component ([#2360](https://github.com/elastic/eui/pull/2360)) | |||
- Added `currency` glyph to 'EuiIcon' ([#2398](https://github.com/elastic/eui/pull/2398)) | |||
- Migrate `EuiBreadcrumbs`, `EuiHeader` etc, and `EuiLink` to TypeScript ([#2391](https://github.com/elastic/eui/pull/2391)) | |||
- Added `component` prop to `EuiPageBody` ([#2410](https://github.com/elastic/eui/pull/2410)) |
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.
- Added `component` prop to `EuiPageBody` ([#2410](https://github.com/elastic/eui/pull/2410)) | |
- Added `component` prop to `EuiPageBody`, switching the default from `div` to `main` ([#2410](https://github.com/elastic/eui/pull/2410)) |
); | ||
}; | ||
|
||
EuiPageBody.propTypes = { | ||
children: PropTypes.node, | ||
className: PropTypes.string, | ||
|
||
component: PropTypes.string, |
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.
Add an autodoc comment above this to say what it does.
Summary
Added
component
prop toEuiPageBody
. Default value ismain
, consumer can pass a different html tag if needed.Covers #2359
Checklist
- [ ] Checked in dark mode- [ ] Checked in mobile- [ ] Checked in IE11 and Firefox-[X] Props have proper autodocs
- [ ] Added documentation examples- [ ] Added or updated jest tests- [ ] Checked for breaking changes and labeled appropriately- [ ] Checked for accessibility including keyboard-only and screenreader modes-[X] A changelog entry exists and is marked appropriately