mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
fix react-burger-menu definitions for pr
This commit is contained in:
Vendored
+38
-34
@@ -5,42 +5,46 @@
|
||||
|
||||
import * as React from "react";
|
||||
|
||||
interface Props {
|
||||
burgerBarClassName?: string;
|
||||
burgerButtonClassName?: string;
|
||||
crossButtonClassName?: string;
|
||||
crossClassName?: string;
|
||||
customBurgerIcon?: Element | false;
|
||||
customCrossIcon?: Element | false;
|
||||
id?: string;
|
||||
isOpen?: boolean;
|
||||
itemListClassName?: string;
|
||||
menuClassName?: string;
|
||||
morphShapeClassName?: string;
|
||||
noOverlay?: boolean;
|
||||
onStateChange?(): void;
|
||||
// TODO (Rajab) This can be improved, though I do not know how. From PropTypes:
|
||||
// styles && styles.outerContainer ? PropTypes.string.isRequired : PropTypes.string
|
||||
outerContainerId?: string;
|
||||
overlayClassName?: string;
|
||||
// TODO (Rajab) This can be improved, though I do not know how. From PropTypes:
|
||||
// styles && styles.pageWrap ? PropTypes.string.isRequired : PropTypes.string,
|
||||
pageWrapId?: string;
|
||||
right?: boolean;
|
||||
styles?: {
|
||||
bmBurgerButton: CSSStyleDeclaration;
|
||||
bmBurgerBars: CSSStyleDeclaration;
|
||||
bmCrossButton: CSSStyleDeclaration;
|
||||
bmCross: CSSStyleDeclaration;
|
||||
bmMenu: CSSStyleDeclaration;
|
||||
bmMorphShape: CSSStyleDeclaration;
|
||||
bmItemList: CSSStyleDeclaration;
|
||||
bmOverlay: CSSStyleDeclaration;
|
||||
};
|
||||
width?: number | string;
|
||||
// TODO (Rajab) actually I don't want export Props, but
|
||||
// `npm run lint react-burger-menu` error doesn't allow me to do it;
|
||||
export interface Props {
|
||||
burgerBarClassName?: string;
|
||||
burgerButtonClassName?: string;
|
||||
crossButtonClassName?: string;
|
||||
crossClassName?: string;
|
||||
customBurgerIcon?: Element | false;
|
||||
customCrossIcon?: Element | false;
|
||||
id?: string;
|
||||
isOpen?: boolean;
|
||||
itemListClassName?: string;
|
||||
menuClassName?: string;
|
||||
morphShapeClassName?: string;
|
||||
noOverlay?: boolean;
|
||||
onStateChange?(): void;
|
||||
// TODO (Rajab) This can be improved, though I do not know how. From PropTypes:
|
||||
// styles && styles.outerContainer ? PropTypes.string.isRequired : PropTypes.string
|
||||
outerContainerId?: string;
|
||||
overlayClassName?: string;
|
||||
// TODO (Rajab) This can be improved, though I do not know how. From PropTypes:
|
||||
// styles && styles.pageWrap ? PropTypes.string.isRequired : PropTypes.string,
|
||||
pageWrapId?: string;
|
||||
right?: boolean;
|
||||
styles?: {
|
||||
bmBurgerButton: CSSStyleDeclaration;
|
||||
bmBurgerBars: CSSStyleDeclaration;
|
||||
bmCrossButton: CSSStyleDeclaration;
|
||||
bmCross: CSSStyleDeclaration;
|
||||
bmMenu: CSSStyleDeclaration;
|
||||
bmMorphShape: CSSStyleDeclaration;
|
||||
bmItemList: CSSStyleDeclaration;
|
||||
bmOverlay: CSSStyleDeclaration;
|
||||
};
|
||||
width?: number | string;
|
||||
}
|
||||
|
||||
declare class ReactBurgerMenu extends React.Component<Props, {}> { }
|
||||
// TODO (Rajab) actually I don't want export ReactBurgerMenu, but
|
||||
// `npm run lint react-burger-menu` error doesn't allow me to do it;
|
||||
export class ReactBurgerMenu extends React.Component<Props, {}> { }
|
||||
|
||||
export class slide extends ReactBurgerMenu { }
|
||||
export class stack extends ReactBurgerMenu { }
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import * as React from 'react';
|
||||
import { slide as Menu } from 'react-burger-menu';
|
||||
|
||||
class Example extends React.Component {
|
||||
class Example extends React.Component<{}, {}> {
|
||||
showSettings(event: {
|
||||
preventDefault: Function;
|
||||
preventDefault(): void;
|
||||
}) {
|
||||
event.preventDefault();
|
||||
}
|
||||
@@ -18,4 +18,4 @@ class Example extends React.Component {
|
||||
</Menu>
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user