UNPKG

@refinedev/core

Version:

Refine is a React meta-framework for building enterprise-level, data-intensive applications rapidly with support for modern UI libraries and headless integrations.

23 lines 794 B
import type { CanReturnType } from "../../../contexts/accessControl/types"; import type { IResourceItem } from "../../../contexts/resource/types"; import type { Action } from "../../../contexts/router/types"; import type { BaseKey } from "../../../contexts/data/types"; type ButtonCanAccessProps = { action: Action | "delete"; resource?: IResourceItem; id?: BaseKey; accessControl?: { enabled?: boolean; hideIfUnauthorized?: boolean; }; meta?: Record<string, unknown>; }; type ButtonCanAccessValues = { title: string; hidden: boolean; disabled: boolean; canAccess: CanReturnType | undefined; }; export declare const useButtonCanAccess: (props: ButtonCanAccessProps) => ButtonCanAccessValues; export {}; //# sourceMappingURL=index.d.ts.map