@sparklink-pro/apant
Version:
Apollo & Antd tools
42 lines • 1.87 kB
TypeScript
/// <reference types="react" />
import { QueryHookOptions } from '@apollo/client';
import { TableProps } from 'antd';
import { GraphQLObject, GraphQLType, AdminHeaderType, AdminFooterType, GraphQLObjects } from '../definitions';
export type AdminTypeOpts = {
type: GraphQLType;
heights: {
offset?: number;
extra?: number;
header?: number;
footer?: number;
};
extraLeft?: (arg: {
items: GraphQLObjects;
itemsFiltered: GraphQLObjects;
}) => JSX.Element;
extraRight?: (arg: {
items: GraphQLObjects;
itemsFiltered: GraphQLObjects;
}) => JSX.Element;
context?: any;
onNew?: ({ type, context }: {
type: GraphQLType;
context: any;
}) => void;
onLink?: (item: GraphQLObject, { type, context }: {
type: GraphQLType;
context: any;
}) => void;
queryOptions?: QueryHookOptions;
};
export declare function AdminTypeHeader({ type, context, search, setSearch, extraLeft, extraRight, items, itemsFiltered, itemsSelected, onNew, }: AdminHeaderType): import("react/jsx-runtime").JSX.Element;
export declare function AdminTypeFooter({ type, items, itemsSelected, selectable, currentPageData, className, children }: AdminFooterType): import("react/jsx-runtime").JSX.Element;
export declare function AdminTypeInner({ type, extraRight, extraLeft, context: adminContext, heights, onNew, onLink, contextExtraProps, queryOptions, ...props }: AdminTypeOpts & Omit<TableProps<GraphQLObject>, 'footer'> & {
contextExtraProps?: object;
}): import("react/jsx-runtime").JSX.Element;
/**
* Render a antd form wrapper with the list of fields.
*/
export declare function AdminType(props: AdminTypeOpts & Omit<TableProps<GraphQLObject>, 'footer'>): import("react/jsx-runtime").JSX.Element;
export default AdminType;
//# sourceMappingURL=AdminType.d.ts.map