Skip to content

Commit b6295ac

Browse files
authored
Added support for React 18 (#67)
1 parent 15cc4f9 commit b6295ac

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

index.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ export interface ContextMenuProps extends ViewProps {
6767
* Currently iOS only. Disable menu interaction
6868
*/
6969
disabled?: boolean;
70+
/**
71+
* Children prop as per upgrade docs: https://reactjs.org/blog/2022/03/08/react-18-upgrade-guide.html#updates-to-typescript-definitions
72+
*/
73+
children?: React.ReactNode;
7074
}
7175

7276
export default class ContextMenu extends Component<ContextMenuProps> { }

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"licenseFilename": "LICENSE",
2525
"readmeFilename": "README.md",
2626
"peerDependencies": {
27-
"react": "^16.8.1 || ^17.0.0",
27+
"react": "^16.8.1 || ^17.0.0 || ^18.0.0",
2828
"react-native": ">=0.60.0-rc.0 <1.0.x"
2929
}
3030
}

0 commit comments

Comments
 (0)