payload-admin-bar
Version:
An admin bar for React apps using Payload CMS
64 lines (63 loc) • 1.54 kB
TypeScript
import React, { CSSProperties, ReactElement } from 'react';
export declare type PayloadMeUser = {
email: string;
id: string;
} | null | undefined;
export declare type PayloadAdminBarProps = {
cmsURL?: string;
adminPath?: string;
apiPath?: string;
collection?: string;
authCollection?: string;
collectionLabels?: {
singular?: string;
plural?: string;
};
id?: string;
logo?: ReactElement;
className?: string;
classNames?: {
user?: string;
logo?: string;
create?: string;
logout?: string;
controls?: string;
edit?: string;
preview?: string;
};
logoProps?: {
style?: CSSProperties;
[key: string]: unknown;
};
divProps?: {
style?: CSSProperties;
[key: string]: unknown;
};
editProps?: {
style?: CSSProperties;
[key: string]: unknown;
};
createProps?: {
style?: CSSProperties;
[key: string]: unknown;
};
userProps?: {
style?: CSSProperties;
[key: string]: unknown;
};
logoutProps?: {
style?: CSSProperties;
[key: string]: unknown;
};
previewProps?: {
style?: CSSProperties;
[key: string]: unknown;
};
style?: CSSProperties;
unstyled?: boolean;
onAuthChange?: (user: PayloadMeUser) => void;
devMode?: boolean;
preview?: boolean;
onPreviewExit?: () => void;
};
export declare const PayloadAdminBar: React.FC<PayloadAdminBarProps>;