mt-flowbite-react
Version:
Official React components built for Flowbite and Tailwind CSS
27 lines (26 loc) • 1.53 kB
TypeScript
import React from 'react';
import type { StateCreator } from 'zustand';
export interface DashInitState {
itemId?: number | string;
itemData?: any;
}
export type ListItemSlice = DashInitState;
type ListItemSliceType = ReturnType<typeof createListItemSlice>;
export declare const createListItemSlice: StateCreator<ListItemSlice, [], [], ListItemSlice>;
export type ListItemStoreType = ReturnType<typeof createListItemStore>;
export declare const createListItemStore: (initProps?: Partial<DashInitState>) => import("zustand").UseBoundStore<Omit<import("zustand").StoreApi<DashInitState>, "persist"> & {
persist: {
setOptions: (options: Partial<import("zustand/middleware").PersistOptions<DashInitState, DashInitState>>) => void;
clearStorage: () => void;
rehydrate: () => void | Promise<void>;
hasHydrated: () => boolean;
onHydrate: (fn: (state: DashInitState) => void) => () => void;
onFinishHydration: (fn: (state: DashInitState) => void) => () => void;
getOptions: () => Partial<import("zustand/middleware").PersistOptions<DashInitState, DashInitState>>;
};
}>;
type ListItemProviderProps = React.PropsWithChildren<Partial<DashInitState>>;
export declare function ListItemProvider({ children, ...props }: ListItemProviderProps): import("react/jsx-runtime").JSX.Element;
export declare function useListItemStore<T>(): ReturnType<typeof createListItemStore>;
export declare function useListItemStore<T>(selector: (state: ListItemSliceType) => T): T;
export {};