Skip to content
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
10 changes: 9 additions & 1 deletion src/components/page/page_header/page_header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* under the License.
*/

import React, { FunctionComponent, HTMLAttributes } from 'react';
import React, { FunctionComponent, HTMLAttributes, useEffect } from 'react';
import classNames from 'classnames';
import { CommonProps, keysOf } from '../../common';
import {
Expand Down Expand Up @@ -92,6 +92,14 @@ export const OuiPageHeader: FunctionComponent<OuiPageHeaderProps> = ({
style
);

useEffect(() => {
if (iconType || iconProps) {
console.warn(
'WARNING: The `iconType` and `iconProps` properties in `OuiPageHeader` are deprecated and will be removed in the future. Please update your code accordingly.'
);
}
}, [iconType, iconProps]);

const classes = classNames(
'ouiPageHeader',
paddingSizeToClassNameMap[paddingSize],
Expand Down
2 changes: 2 additions & 0 deletions src/components/page/page_header/page_header_content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,12 @@ export type OuiPageHeaderContentTitle = {
pageTitle?: ReactNode;
/**
* Optional icon to place to the left of the title
* @deprecated The `iconType` prop is deprecated and will be removed in the future.
*/
iconType?: IconType;
/**
* Additional OuiIcon props to apply to the optional icon
* @deprecated The `iconProps` prop is deprecated and will be removed in the future.
*/
iconProps?: Partial<Omit<OuiIconProps, 'type'>>;
};
Expand Down