diff --git a/src/Button/index.jsx b/src/Button/index.jsx index 7b497901ee..7180ff3bfa 100644 --- a/src/Button/index.jsx +++ b/src/Button/index.jsx @@ -52,10 +52,10 @@ Button.propTypes = { variant: PropTypes.string, /** An icon component to render. * Example import of a Paragon icon component: `import { Check } from '@edx/paragon/icons';` */ - iconBefore: PropTypes.oneOfType([PropTypes.func, PropTypes.node]), + iconBefore: PropTypes.oneOfType([PropTypes.elementType, PropTypes.node]), /** An icon component to render. * Example import of a Paragon icon component: `import { Check } from '@edx/paragon/icons';` */ - iconAfter: PropTypes.oneOfType([PropTypes.func, PropTypes.node]), + iconAfter: PropTypes.oneOfType([PropTypes.elementType, PropTypes.node]), }; Button.defaultProps = { diff --git a/src/Dropzone/index.jsx b/src/Dropzone/index.jsx index 8712f54301..1eecc7ac1f 100644 --- a/src/Dropzone/index.jsx +++ b/src/Dropzone/index.jsx @@ -270,7 +270,7 @@ Dropzone.propTypes = { */ validator: PropTypes.func, /** A component to display initial state of the `Dropzone`. */ - inputComponent: PropTypes.oneOfType([PropTypes.func, PropTypes.node]), + inputComponent: PropTypes.oneOfType([PropTypes.elementType, PropTypes.node]), }; export default Dropzone; diff --git a/src/Icon/index.jsx b/src/Icon/index.jsx index 482b37d03b..f30732e9b8 100644 --- a/src/Icon/index.jsx +++ b/src/Icon/index.jsx @@ -74,7 +74,7 @@ Icon.propTypes = { * An icon component to render. * Example import of a Paragon icon component: `import { Check } from '@edx/paragon/icons';` */ - src: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), + src: PropTypes.oneOfType([PropTypes.element, PropTypes.elementType]), /** HTML element attributes to pass through to the underlying svg element */ svgAttrs: PropTypes.shape({ 'aria-label': PropTypes.string, diff --git a/src/IconButton/index.jsx b/src/IconButton/index.jsx index 3c07593435..aa3cdc158c 100644 --- a/src/IconButton/index.jsx +++ b/src/IconButton/index.jsx @@ -80,7 +80,7 @@ IconButton.propTypes = { /** An icon component to render. Example import of a Paragon icon component: * `import { Check } from '@edx/paragon/dist/icon';` * */ - src: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), + src: PropTypes.oneOfType([PropTypes.element, PropTypes.elementType]), /** Alt text for your icon. For best practice, avoid using alt text to describe * the image in the `IconButton`. Instead, we recommend describing the function * of the button. */ diff --git a/src/Menu/MenuItem.jsx b/src/Menu/MenuItem.jsx index a8034a18e7..165fc8f5a2 100644 --- a/src/Menu/MenuItem.jsx +++ b/src/Menu/MenuItem.jsx @@ -40,9 +40,9 @@ MenuItem.propTypes = { /** Specifies the base element */ as: PropTypes.elementType, /** Specifies the jsx before the content of the ``MenuItem`` */ - iconBefore: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), + iconBefore: PropTypes.oneOfType([PropTypes.element, PropTypes.elementType]), /** Specifies the jsx after the content of the ``MenuItem`` */ - iconAfter: PropTypes.oneOfType([PropTypes.element, PropTypes.func]), + iconAfter: PropTypes.oneOfType([PropTypes.element, PropTypes.elementType]), }; MenuItem.defaultProps = { diff --git a/src/Overlay/README.md b/src/Overlay/README.md index da86dc330c..af259d0d0d 100644 --- a/src/Overlay/README.md +++ b/src/Overlay/README.md @@ -38,7 +38,7 @@ This component is used to power Tooltips and Popovers. Click me to see - + {({ placement, arrowProps, show: _show, popper, ...props }) => (
` transition, * or a custom react-transition-group `` component can be provided. */ - transition: PropTypes.func, + transition: PropTypes.oneOfType([PropTypes.object, PropTypes.bool]), }; OverlayTrigger.propTypes = { diff --git a/www/src/components/Menu.tsx b/www/src/components/Menu.tsx index c2fe25d406..1c267a7259 100644 --- a/www/src/components/Menu.tsx +++ b/www/src/components/Menu.tsx @@ -75,7 +75,7 @@ export interface IComponentNavItem { type: string, status?: string, }, - isActive: boolean, + isActive?: boolean, } export function ComponentNavItem({