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