Skip to content

Commit a7a32fd

Browse files
sagyosSagyos
andauthored
Added support for children react 18 (#16)
* Added support for children react 18 * more children Co-authored-by: Sagyos <sagi.y@openweb.com@sagis-mbp-3.com>
1 parent 073d070 commit a7a32fd

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@open-web/react-sdk",
3-
"version": "1.4.0",
3+
"version": "1.4.1",
44
"description": "React wrapper around OpenWeb's products",
55
"author": "OpenWeb",
66
"license": "UNLICENSED",

src/components/OpenWebProvider/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ interface IProps {
1111
spotId: string;
1212
authentication?: TUseAuthentication;
1313
tracking?: { [eventName: string]: (event: OpenWebSDKEvent) => any };
14+
children?: React.ReactNode;
1415
}
1516

1617
export const OpenWebProvider: React.FC<IProps> = ({ spotId, authentication, tracking = {}, children }) => {

src/components/ProductWrapper/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ import { useOpenWebContext } from '../../common/context';
44
import { IOpenWebBaseProps } from '../../types';
55
import { useLauncher } from '../../common/hooks/useLauncher';
66

7-
export const ProductWrapper: React.FC<Partial<IOpenWebBaseProps>> = ({ spotId: _spotId, children, ...rest }) => {
7+
export const ProductWrapper: React.FC<Partial<IOpenWebBaseProps & { children?: React.ReactNode }>> = ({
8+
spotId: _spotId,
9+
children,
10+
...rest
11+
}) => {
812
const owContext = useOpenWebContext();
913
const spotId = _spotId || owContext.spotId;
1014

0 commit comments

Comments
 (0)