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

fix(ObjectPage - TypeScript): correct type of children #5445

Merged
merged 1 commit into from
Jan 29, 2024
Merged
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
4 changes: 3 additions & 1 deletion packages/main/src/components/ObjectPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ addCustomCSSWithScoping(

const TAB_CONTAINER_HEADER_HEIGHT = 48;

type ObjectPageSectionType = ReactElement<ObjectPageSectionPropTypes> | boolean;

export interface ObjectPagePropTypes extends Omit<CommonProps, 'placeholder'> {
/**
* Defines the upper, always static, title section of the `ObjectPage`.
Expand Down Expand Up @@ -61,7 +63,7 @@ export interface ObjectPagePropTypes extends Omit<CommonProps, 'placeholder'> {
*
* __Note:__ Although this prop accepts all HTML Elements, it is strongly recommended that you only use `ObjectPageSection` and `ObjectPageSubSection` in order to preserve the intended design.
*/
children?: ReactElement<ObjectPageSectionPropTypes> | ReactElement<ObjectPageSectionPropTypes>[];
children?: ObjectPageSectionType | ObjectPageSectionType[];
/**
* Defines the ID of the currently `ObjectPageSection` section.
*/
Expand Down
Loading