chore(): update deps (#19437)

This commit is contained in:
Manu MA
2019-09-25 18:12:57 +02:00
committed by GitHub
parent 0f05ea4245
commit 446cf78e58
8 changed files with 219 additions and 119 deletions

View File

@ -8,16 +8,12 @@ import { RouterDirection } from './hrefprops';
import { attachEventProps, createForwardRef, dashToPascalCase, isCoveredByReact } from './utils';
import { deprecationWarning } from './utils/dev';
interface IonicReactInternalProps<ElementType> {
interface IonicReactInternalProps<ElementType> extends React.HTMLAttributes<ElementType> {
forwardedRef?: React.Ref<ElementType>;
children?: React.ReactNode;
href?: string;
routerLink?: string;
target?: string;
style?: string;
ref?: React.Ref<any>;
routerDirection?: RouterDirection;
className?: string;
}
export const createReactComponent = <PropType, ElementType>(
@ -25,10 +21,10 @@ export const createReactComponent = <PropType, ElementType>(
hrefComponent = false
) => {
const displayName = dashToPascalCase(tagName);
const ReactComponent = class extends React.Component<IonicReactInternalProps<ElementType>> {
const ReactComponent = class extends React.Component<IonicReactInternalProps<PropType>> {
context!: React.ContextType<typeof NavContext>;
constructor(props: IonicReactInternalProps<ElementType>) {
constructor(props: IonicReactInternalProps<PropType>) {
super(props);
}
@ -41,7 +37,7 @@ export const createReactComponent = <PropType, ElementType>(
}
}
componentDidUpdate(prevProps: IonicReactInternalProps<ElementType>) {
componentDidUpdate(prevProps: IonicReactInternalProps<PropType>) {
const node = ReactDom.findDOMNode(this) as HTMLElement;
attachEventProps(node, this.props, prevProps);
}