Skip to content

Commit

Permalink
fix(ObjectPage - TypeScript): correct type of children (#5445)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas742 authored Jan 29, 2024
1 parent a099560 commit 4da4c49
Showing 1 changed file with 3 additions and 1 deletion.
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

0 comments on commit 4da4c49

Please sign in to comment.