mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-13 05:20:25 +00:00
Merge pull request #23552 from radziksh/react-burger-menu
[react-burger-menu] update typings to 2.2
This commit is contained in:
Vendored
+17
-13
@@ -1,4 +1,4 @@
|
||||
// Type definitions for react-burger-menu 2.1
|
||||
// Type definitions for react-burger-menu 2.2
|
||||
// Project: https://github.com/negomi/react-burger-menu
|
||||
// Definitions by: Rajab Shakirov <https://github.com/radziksh>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -7,23 +7,35 @@
|
||||
import * as React from "react";
|
||||
|
||||
export interface State {
|
||||
isOpen: boolean;
|
||||
isOpen: boolean;
|
||||
}
|
||||
|
||||
export interface Styles {
|
||||
bmBurgerBars: Partial<CSSStyleDeclaration>;
|
||||
bmBurgerButton: Partial<CSSStyleDeclaration>;
|
||||
bmCross: Partial<CSSStyleDeclaration>;
|
||||
bmCrossButton: Partial<CSSStyleDeclaration>;
|
||||
bmItemList: Partial<CSSStyleDeclaration>;
|
||||
bmMenu: Partial<CSSStyleDeclaration>;
|
||||
bmMorphShape: Partial<CSSStyleDeclaration>;
|
||||
bmOverlay: Partial<CSSStyleDeclaration>;
|
||||
}
|
||||
|
||||
export interface Props {
|
||||
bodyClassName?: string;
|
||||
burgerBarClassName?: string;
|
||||
burgerButtonClassName?: string;
|
||||
crossButtonClassName?: string;
|
||||
crossClassName?: string;
|
||||
customBurgerIcon?: JSX.Element | false;
|
||||
customCrossIcon?: JSX.Element | false;
|
||||
disableOverlayClick?: boolean;
|
||||
id?: string;
|
||||
isOpen?: boolean;
|
||||
itemListClassName?: string;
|
||||
menuClassName?: string;
|
||||
morphShapeClassName?: string;
|
||||
noOverlay?: boolean;
|
||||
disableOverlayClick?: boolean;
|
||||
onStateChange?(state: State): void;
|
||||
// TODO (Rajab) This can be improved, though I do not know how. From PropTypes:
|
||||
// styles && styles.outerContainer ? PropTypes.string.isRequired : PropTypes.string
|
||||
@@ -33,16 +45,7 @@ export interface Props {
|
||||
// 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;
|
||||
};
|
||||
styles?: Styles;
|
||||
width?: number | string;
|
||||
}
|
||||
|
||||
@@ -57,3 +60,4 @@ export class pushRotate extends ReactBurgerMenu { }
|
||||
export class scaleDown extends ReactBurgerMenu { }
|
||||
export class scaleRotate extends ReactBurgerMenu { }
|
||||
export class fallDown extends ReactBurgerMenu { }
|
||||
export class reveal extends ReactBurgerMenu { }
|
||||
|
||||
Reference in New Issue
Block a user