@wix/headless-restaurants-olo 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -24,6 +24,19 @@ export interface RootProps {
|
|
|
24
24
|
itemDetailsServiceConfig: ItemServiceConfig;
|
|
25
25
|
}
|
|
26
26
|
export declare const Root: ({ children, itemDetailsServiceConfig }: RootProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
/**
|
|
28
|
+
* Displays the item name with customizable rendering.
|
|
29
|
+
*
|
|
30
|
+
* @component
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* <ItemDetails.Name />
|
|
34
|
+
* <ItemDetails.Name asChild>
|
|
35
|
+
* <h2 className="font-heading text-lg" />
|
|
36
|
+
* </ItemDetails.Name>
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare const Name: React.ForwardRefExoticComponent<ItemDetailsNameProps & React.RefAttributes<HTMLElement>>;
|
|
27
40
|
export interface ItemDetailsNameProps {
|
|
28
41
|
asChild?: boolean;
|
|
29
42
|
/** Custom render function when using asChild */
|
|
@@ -17,6 +17,22 @@ var TestIds;
|
|
|
17
17
|
export const Root = ({ children, itemDetailsServiceConfig }) => {
|
|
18
18
|
return (_jsx(CoreItemDetails.Root, { itemDetailsServiceConfig: itemDetailsServiceConfig, children: ({ item }) => _jsx(Item.Root, { item: item, children: children }) }));
|
|
19
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* Displays the item name with customizable rendering.
|
|
22
|
+
*
|
|
23
|
+
* @component
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <ItemDetails.Name />
|
|
27
|
+
* <ItemDetails.Name asChild>
|
|
28
|
+
* <h2 className="font-heading text-lg" />
|
|
29
|
+
* </ItemDetails.Name>
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export const Name = React.forwardRef(({ asChild, children, className, ...rest }, ref) => {
|
|
33
|
+
return (_jsx(Item.Name, { ref: ref, asChild: asChild, className: className, "data-testid": TestIds.itemName, ...rest, children: children }));
|
|
34
|
+
});
|
|
35
|
+
Name.displayName = 'ItemDetails.Name';
|
|
20
36
|
/**
|
|
21
37
|
* Add to Cart button for the menu item.
|
|
22
38
|
* Triggers the action to add the selected item (and its modifiers/variants) to the cart.
|
|
@@ -24,6 +24,19 @@ export interface RootProps {
|
|
|
24
24
|
itemDetailsServiceConfig: ItemServiceConfig;
|
|
25
25
|
}
|
|
26
26
|
export declare const Root: ({ children, itemDetailsServiceConfig }: RootProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
/**
|
|
28
|
+
* Displays the item name with customizable rendering.
|
|
29
|
+
*
|
|
30
|
+
* @component
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* <ItemDetails.Name />
|
|
34
|
+
* <ItemDetails.Name asChild>
|
|
35
|
+
* <h2 className="font-heading text-lg" />
|
|
36
|
+
* </ItemDetails.Name>
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare const Name: React.ForwardRefExoticComponent<ItemDetailsNameProps & React.RefAttributes<HTMLElement>>;
|
|
27
40
|
export interface ItemDetailsNameProps {
|
|
28
41
|
asChild?: boolean;
|
|
29
42
|
/** Custom render function when using asChild */
|
|
@@ -17,6 +17,22 @@ var TestIds;
|
|
|
17
17
|
export const Root = ({ children, itemDetailsServiceConfig }) => {
|
|
18
18
|
return (_jsx(CoreItemDetails.Root, { itemDetailsServiceConfig: itemDetailsServiceConfig, children: ({ item }) => _jsx(Item.Root, { item: item, children: children }) }));
|
|
19
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* Displays the item name with customizable rendering.
|
|
22
|
+
*
|
|
23
|
+
* @component
|
|
24
|
+
* @example
|
|
25
|
+
* ```tsx
|
|
26
|
+
* <ItemDetails.Name />
|
|
27
|
+
* <ItemDetails.Name asChild>
|
|
28
|
+
* <h2 className="font-heading text-lg" />
|
|
29
|
+
* </ItemDetails.Name>
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export const Name = React.forwardRef(({ asChild, children, className, ...rest }, ref) => {
|
|
33
|
+
return (_jsx(Item.Name, { ref: ref, asChild: asChild, className: className, "data-testid": TestIds.itemName, ...rest, children: children }));
|
|
34
|
+
});
|
|
35
|
+
Name.displayName = 'ItemDetails.Name';
|
|
20
36
|
/**
|
|
21
37
|
* Add to Cart button for the menu item.
|
|
22
38
|
* Triggers the action to add the selected item (and its modifiers/variants) to the cart.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/headless-restaurants-olo",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "npm run build:esm && npm run build:cjs",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@radix-ui/react-slot": "^1.1.0",
|
|
52
52
|
"@wix/auto_sdk_restaurants_items": "^1.0.48",
|
|
53
|
-
"@wix/headless-media": "
|
|
53
|
+
"@wix/headless-media": "0.0.15",
|
|
54
54
|
"@wix/headless-utils": "^0.0.4",
|
|
55
55
|
"@wix/redirects": "^1.0.0",
|
|
56
56
|
"@wix/restaurants": "^1.0.396",
|
|
@@ -59,6 +59,6 @@
|
|
|
59
59
|
"@wix/services-manager-react": "^0.1.26"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
|
-
"@wix/headless-components": "
|
|
62
|
+
"@wix/headless-components": "0.0.16"
|
|
63
63
|
}
|
|
64
|
-
}
|
|
64
|
+
}
|