@shophost/react 2.0.42 → 2.0.44
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.
- package/README.md +10 -1
- package/admin/components/navigation/admin-breadcrumbs.d.ts +6 -0
- package/admin/router/breadcrumbs.d.ts +7 -0
- package/admin/shell/views/admin-shell.d.ts +3 -1
- package/admin-client.cjs +1 -1
- package/admin-client.js +1289 -1186
- package/package.json +4 -3
- package/react.css +1 -1
- package/storefront/exports.d.ts +1 -0
- package/storefront/lib/storefront-appearance.d.ts +8 -0
- package/storefront/providers/shophost-provider.d.ts +5 -0
- package/storefront/providers/storefront-appearance-provider.d.ts +8 -0
package/README.md
CHANGED
|
@@ -86,13 +86,22 @@ import React from "react";
|
|
|
86
86
|
|
|
87
87
|
export function AppProvider({ children, locale }: { children: React.ReactNode; locale: Locale }) {
|
|
88
88
|
return (
|
|
89
|
-
<ShophostProvider
|
|
89
|
+
<ShophostProvider
|
|
90
|
+
baseUrl={process.env.NEXT_PUBLIC_APP_DOMAIN!}
|
|
91
|
+
locale={locale}
|
|
92
|
+
organizationId={process.env.NEXT_PUBLIC_ORGANIZATION_ID!}
|
|
93
|
+
appearance={{ primaryColor: "#0f766e" }}
|
|
94
|
+
modifiersModal={<ModifiersDialog />}
|
|
95
|
+
>
|
|
90
96
|
{children}
|
|
91
97
|
</ShophostProvider>
|
|
92
98
|
);
|
|
93
99
|
}
|
|
94
100
|
```
|
|
95
101
|
|
|
102
|
+
`appearance.primaryColor` accepts either a Tailwind color token like `bg-emerald-500`
|
|
103
|
+
or a raw CSS color such as `#10b981`.
|
|
104
|
+
|
|
96
105
|
Mount the built-in checkout and account flows:
|
|
97
106
|
|
|
98
107
|
```tsx
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
2
|
+
import { RouteView } from '../../router/resolve';
|
|
3
|
+
export declare function AdminShell({ children, view, }: {
|
|
3
4
|
children: React.ReactNode;
|
|
5
|
+
view: RouteView;
|
|
4
6
|
}): import("react/jsx-runtime").JSX.Element;
|