-
Notifications
You must be signed in to change notification settings - Fork 72
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
[OSCI] Added a console warning for panelled prop #1142
base: main
Are you sure you want to change the base?
Changes from all commits
d53f46b
6deaa3f
2243415
eaac802
3c0ff2f
50f794c
bac2efa
5c49240
bc435cf
f34d3d6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,7 @@ import { | |
setPropsForRestrictedPageWidth, | ||
} from '../_restrict_width'; | ||
import { OuiPanel, OuiPanelProps } from '../../panel'; | ||
import { useDeprecatedPropWarning } from '../../../utils/deprecated'; | ||
|
||
const paddingSizeToClassNameMap = { | ||
none: null, | ||
|
@@ -61,6 +62,7 @@ export type OuiPageBodyProps<T extends ComponentTypes = 'main'> = CommonProps & | |
panelled?: boolean; | ||
/** | ||
* Extends any extra OuiPanel props if `panelled=true` | ||
* **panelled prop is deprecated in version 2.0.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is comment is on the wrong line - comments precede the props, so the comments for the |
||
*/ | ||
panelProps?: Omit<OuiPanelProps, 'paddingSize'>; | ||
/** | ||
|
@@ -86,6 +88,7 @@ export const OuiPageBody = <T extends ComponentTypes>({ | |
style | ||
); | ||
|
||
useDeprecatedPropWarning({ props: { panelled }, version: '2.0.0' }); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should also include |
||
const nonBreakingDefaultPadding = panelled ? 'l' : 'none'; | ||
paddingSize = paddingSize || nonBreakingDefaultPadding; | ||
|
||
|
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.
nit - use imperative for changelog entries, and link to the PR, not the issue