@shophost/react 2.0.43 → 2.0.45

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,3 +24,4 @@ export * from './hooks/useLocalization';
24
24
  export { ShophostProvider } from './providers/shophost-provider';
25
25
  export { APIProvider, useAPI } from './providers/api-provider';
26
26
  export { useOrganization } from './providers/organization-provider';
27
+ export type { StorefrontAppearance } from './lib/storefront-appearance';
@@ -0,0 +1,8 @@
1
+ export interface StorefrontAppearance {
2
+ primaryColor?: string;
3
+ }
4
+ export declare const resolveStorefrontPrimaryColor: (input?: string) => {
5
+ color: any;
6
+ foreground: string;
7
+ };
8
+ export declare const buildStorefrontAppearanceCss: (appearance?: StorefrontAppearance) => string;
@@ -1,5 +1,6 @@
1
1
  import { Locale, Organization } from '../../../../client/src/index.ts';
2
2
  import { default as React } from 'react';
3
+ import { StorefrontAppearance } from '../lib/storefront-appearance';
3
4
  export interface ShophostProviderProps {
4
5
  /**
5
6
  * The URL of shophost server
@@ -13,6 +14,10 @@ export interface ShophostProviderProps {
13
14
  * Locale for translations
14
15
  */
15
16
  locale?: Locale;
17
+ /**
18
+ * Storefront visual customization
19
+ */
20
+ appearance?: StorefrontAppearance;
16
21
  /**
17
22
  * Organization data available during initial render
18
23
  */
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { StorefrontAppearance } from '../lib/storefront-appearance';
3
+ interface StorefrontAppearanceProviderProps {
4
+ appearance?: StorefrontAppearance;
5
+ children: React.ReactNode;
6
+ }
7
+ export declare const StorefrontAppearanceProvider: React.FC<StorefrontAppearanceProviderProps>;
8
+ export {};