Skip to content

Commit

Permalink
Merge pull request #1553 from dhis2/fix-types
Browse files Browse the repository at this point in the history
fix(ts and prop types): correct some types and propTypes
  • Loading branch information
Mohammer5 authored Jul 15, 2024
2 parents d58240d + c093a14 commit 7a20bfe
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/menu/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export interface MenuItemProps {
/**
* A supporting element shown at the end of the menu item
*/
suffix: React.ReactNode
suffix?: React.ReactNode
tabIndex?: number
/**
* For using menu item as a link
Expand Down
2 changes: 1 addition & 1 deletion components/modal/src/modal-title/modal-title.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ ModalTitle.defaultProps = {
}

ModalTitle.propTypes = {
children: PropTypes.string,
children: PropTypes.node,
dataTest: PropTypes.string,
}
2 changes: 1 addition & 1 deletion components/modal/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export interface ModalContentProps {
export const ModalContent: React.FC<ModalContentProps>

export interface ModalTitleProps {
children?: string
children?: React.ReactNode
dataTest?: string
}

Expand Down
2 changes: 1 addition & 1 deletion components/tag/src/tag.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Tag.defaultProps = {
Tag.propTypes = {
/** Use bold tags where it is important that the tag is seen by the user in an information dense interface. Bold tags should be reserved for edge cases and not overused. */
bold: PropTypes.bool,
children: PropTypes.string,
children: PropTypes.node,
className: PropTypes.string,
dataTest: PropTypes.string,
/** Tags can contain icons. Use icons where they will help users easily identify the content of the tag. Tags must have a text label and cannot display only an icon. */
Expand Down
2 changes: 1 addition & 1 deletion components/tag/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export interface TagProps {
* Use bold tags where it is important that the tag is seen by the user in an information dense interface. Bold tags should be reserved for edge cases and not overused.
*/
bold?: boolean
children?: string
children?: React.ReactNode
className?: string
dataTest?: string
/**
Expand Down
2 changes: 2 additions & 0 deletions icons/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ export const IconSubscribe16: React.FC<IconProps>
export const IconSubscribe24: React.FC<IconProps>
export const IconSubscribeOff16: React.FC<IconProps>
export const IconSubscribeOff24: React.FC<IconProps>
export const IconSubtract16: React.FC<IconProps>
export const IconSubtract24: React.FC<IconProps>
export const IconSubtractCircle16: React.FC<IconProps>
export const IconSubtractCircle24: React.FC<IconProps>
export const IconSync16: React.FC<IconProps>
Expand Down

0 comments on commit 7a20bfe

Please sign in to comment.