Skip to content

Commit ddc3939

Browse files
committed
fix(CPopover): fix wrong PropTypes
1 parent 0cec556 commit ddc3939

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/coreui-react/src/components/popover/CPopover.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export interface CPopoverProps {
1313
/**
1414
* Content node for your component.
1515
*/
16-
content: ReactNode
16+
content: ReactNode | string
1717
/**
1818
* Offset of the popover relative to its target.
1919
*/
@@ -29,7 +29,7 @@ export interface CPopoverProps {
2929
/**
3030
* Title node for your component.
3131
*/
32-
title?: ReactNode
32+
title?: ReactNode | string
3333
/**
3434
* Sets which event handlers you’d like provided to your toggle prop. You can specify one trigger or an array of them.
3535
*
@@ -147,12 +147,12 @@ export const CPopover: FC<CPopoverProps> = ({
147147

148148
CPopover.propTypes = {
149149
children: PropTypes.any,
150-
content: PropTypes.node,
150+
content: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
151151
placement: PropTypes.oneOf(['auto', 'top', 'right', 'bottom', 'left']),
152152
offset: PropTypes.any, // TODO: find good proptype
153153
onHide: PropTypes.func,
154154
onShow: PropTypes.func,
155-
title: PropTypes.string,
155+
title: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
156156
trigger: triggerPropType,
157157
visible: PropTypes.bool,
158158
}

0 commit comments

Comments
 (0)