@hackplan/polaris
Version:
Shopify’s product component library
24 lines (23 loc) • 867 B
TypeScript
import React from 'react';
import { ActionListSection, ComplexAction, MenuGroupDescriptor } from '../../types';
export interface Props {
/** Collection of page-level secondary actions */
actions?: ComplexAction[];
/** Collection of page-level action groups */
groups?: MenuGroupDescriptor[];
/** Roll up all actions into a Popover > ActionList */
rollup?: boolean;
}
interface State {
activeMenuGroup?: string;
}
export default class ActionMenu extends React.PureComponent<Props, State> {
state: State;
render(): JSX.Element | null;
private renderActions;
private handleMenuGroupToggle;
private handleMenuGroupClose;
}
export declare function hasGroupsWithActions(groups?: Props['groups']): boolean;
export declare function convertGroupToSection({ title, actions, }: MenuGroupDescriptor): ActionListSection;
export {};