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: prop types #2442

Merged
merged 1 commit into from
Aug 15, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/components/Button/buttonContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default function ButtonContent({ label, children }) {
}

ButtonContent.propTypes = {
label: PropTypes.string,
label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
children: PropTypes.node,
};

Expand Down
3 changes: 2 additions & 1 deletion src/components/InternalOverlay/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ InternalOverlay.propTypes = {
/** Controls whether the InternalOverlay is visible or not. If true, the content of the Overlay is shown. */
isVisible: PropTypes.bool,
/** Ref or function that returns a ref to a DOM element, the DOM element resolved by this ref will be used to positioning the component passed when visible. */
triggerElementRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired,
triggerElementRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func]),
/** It could be used to write your own position resolution. The function passed here will receive the necessary data to compute an object with { top, left } CSS position of the component rendered. */
positionResolver: PropTypes.func,
/** A callback triggered when the overlay component is opened. This is useful for example to set focus
Expand All @@ -169,6 +169,7 @@ InternalOverlay.defaultProps = {
onOpened: () => {},
children: undefined,
keepScrollEnabled: false,
triggerElementRef: undefined,
};

InternalOverlay.defaultPositionResolver = defaultPositionResolver;
Expand Down