mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 19:57:22 +08:00
chore(): update deps (#19437)
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user