UNPKG

dgz-ui-shared

Version:

Custom ui library using React.js, Shadcn/ui, TailwindCSS, Typescript, dgz-ui library

32 lines 1.22 kB
import { DropdownContainerProps } from 'dgz-ui/dropdown'; import { ReactNode } from 'react'; /** * Interface representing a single action item. */ export interface ActionInterface { /** The content to display for the action item. */ label: ReactNode; /** Callback function to execute when the action is clicked. */ onClick: () => void; access?: string[]; } /** * Props for the Actions component. */ export interface ActionsProps extends DropdownContainerProps { /** Array of action items to be displayed in the dropdown. */ actions: ActionInterface[]; /** Title for the actions button. */ title?: ReactNode; } /** * Actions renders a dropdown menu with a list of action items. * * @param actions - Array of actions with label and onClick handler. * @param triggerProps - Props passed to the dropdown trigger. * @param contentProps - Props passed to the dropdown content. * @param title - Optional title for the actions button. * @returns {JSX.Element} React element rendering the actions dropdown. */ export declare const Actions: ({ actions, triggerProps, contentProps, title, }: ActionsProps) => import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=Actions.d.ts.map