Common UI kit components
Confluence UI kit components
Jira UI kit components
Jira Service Management UI kit components

Rate this page:

IssuePanelAction

An item in the more actions (•••) menu of an IssuePanel.

Example of an issue panel with a custom action

Usage notes

  • It must be provided as an argument to the actions property of the IssuePanel component.
  • You can view existing issue panel actions via the more actions (•••) menu.

Import statement

1
2
import ForgeUI, { IssuePanelAction } from '@forge/ui';

Props

NameTypeRequiredDescription
textstringYesThe name of the item that’s added to the actions menu of an issue panel.
onClick() => void|Promise<void>YesAn event handler executed when the item is clicked. You can perform state updates inside this function.

Example

1
2
import 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: