← All proposals

Agentic Split Button

A separate component, `AgenticSplitButton`, a copy of the PDS v2 Split Button, so the engineer's port is mostly a copy:

Extends a PDS componentOpen in Storybook

proposals/AgenticSplitButton/split-button-sample-data.tsx19 lines · View on GitHub
import type { MenuItemType } from '@pantheon-systems/pds-toolkit-react';

const sampleCallback = (item?: MenuItemType) => {
	window.alert(`Activated action => ${item?.label}`);
};

export const sampleActionItems = [
	{ label: 'Investigate', callback: sampleCallback },
	{ label: 'Run now', callback: sampleCallback },
	{ label: 'Schedule for later', callback: sampleCallback },
	{ label: 'Dry run', callback: sampleCallback },
];

export const linkActionItems = [
	{ isLink: true, linkContent: <a href='#'>Open investigation</a> },
	{ label: 'Run now', callback: sampleCallback },
	{ label: 'Schedule for later', callback: sampleCallback },
];