Rate this page:
An item in the more actions (•••) menu of an IssuePanel.
actions
property of the
IssuePanel component.1 2import ForgeUI, { IssuePanelAction } from '@forge/ui';
Name | Type | Required | Description |
---|---|---|---|
text | string | Yes | The name of the item that’s added to the actions menu of an issue panel. |
onClick | () => void|Promise<void> | Yes | An event handler executed when the item is clicked. You can perform state updates inside this function. |
1 2import ForgeUI, {IssuePanel, IssuePanelAction, render, Text, useProductContext, useState} from '@forge/ui'; const App = () => { const [waveCount, setWaveCount] = useState(0); return ( <IssuePanel actions={[ <IssuePanelAction text="Custom action" onClick={() => { setWaveCount(waveCount + 1); }}/> ]}> <Text>Hello, world! {"👋".repeat(waveCount)}</Text> </IssuePanel> ); }; export const run = render( <App/> );
Rate this page: