UNPKG

@nouance/payload-better-fields-plugin

Version:

A Payload plugin that aims to provide improved fields for the admin panel

28 lines (27 loc) 614 B
import type { Field, UIField } from 'payload'; export type BaseConfig = { message: string; type: 'alert' | 'error' | 'info'; }; export type Config = { className?: string; icon?: { enable?: boolean; }; } & BaseConfig; interface BetterUIField extends Omit<UIField, 'admin' | 'type'> { admin?: UIField['admin']; } type AlertBox = (overrides: { /** * Config for the alert box. * Type defaults to 'info' */ config: Config; /** * Field overrides */ overrides: BetterUIField; }) => Field[]; export declare const AlertBoxField: AlertBox; export {};