mirror of
https://github.com/Mastermindzh/react-cookie-consent.git
synced 2025-01-20 18:41:44 +01:00
Adjust the typing and the prop-type definitions related to the ButtonComponent property
This commit is contained in:
parent
4a37243ec2
commit
c1659cef53
2
src/index.d.ts
vendored
2
src/index.d.ts
vendored
@ -32,7 +32,7 @@ export interface CookieConsentProps {
|
||||
disableButtonStyles?: boolean;
|
||||
enableDeclineButton?: boolean;
|
||||
flipButtons?: boolean;
|
||||
ButtonComponent?: Function | React.ReactElement;
|
||||
ButtonComponent?: React.ElementType;
|
||||
}
|
||||
|
||||
export default class CookieConsent extends React.Component<CookieConsentProps, {}> {}
|
||||
|
@ -301,7 +301,7 @@ CookieConsent.propTypes = {
|
||||
disableButtonStyles: PropTypes.bool,
|
||||
enableDeclineButton: PropTypes.bool,
|
||||
flipButtons: PropTypes.bool,
|
||||
ButtonComponent: PropTypes.oneOfType([PropTypes.func, PropTypes.element])
|
||||
ButtonComponent: PropTypes.elementType
|
||||
};
|
||||
|
||||
CookieConsent.defaultProps = {
|
||||
|
Loading…
Reference in New Issue
Block a user