@storecraft/dashboard 1.2.5 → 1.3.0

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.
@@ -5,12 +5,10 @@ export type LoginFormFieldsType = {
5
5
  endpoint?: string;
6
6
  };
7
7
  export type LoginFormProps = withDashDiv<{
8
- onChange: (id: string, value: string) => void;
9
- onSubmit: React.FormEventHandler<HTMLFormElement>;
10
- error: object;
11
- credentials: LoginFormFieldsType;
8
+ defaultCredentials: LoginFormFieldsType;
9
+ signinWithErrorHandling: (email: string, password: string, endpoint?: string) => Promise<void>;
12
10
  is_backend_endpoint_editable?: boolean;
13
11
  }>;
14
- declare const LoginForm: ({ dash: { onChange, onSubmit, error, credentials, is_backend_endpoint_editable, }, ...rest }: LoginFormProps) => import("react/jsx-runtime").JSX.Element;
12
+ declare const LoginForm: ({ dash: { signinWithErrorHandling, is_backend_endpoint_editable, defaultCredentials, }, ...rest }: LoginFormProps) => import("react/jsx-runtime").JSX.Element;
15
13
  export declare const SocialLogin: ({}: {}) => import("react/jsx-runtime").JSX.Element;
16
14
  export default LoginForm;
@@ -1,7 +1,7 @@
1
1
  export type StorecraftDashboardPreferences = {
2
2
  darkMode?: boolean;
3
3
  };
4
- export declare const usePreferences: () => {
4
+ export declare const usePreferences: (defaultValue?: StorecraftDashboardPreferences) => {
5
5
  state: StorecraftDashboardPreferences;
6
- setState: ($state: StorecraftDashboardPreferences) => void;
6
+ setState: ($state: StorecraftDashboardPreferences | ((prev: StorecraftDashboardPreferences) => StorecraftDashboardPreferences)) => void;
7
7
  };