Rate this page:
A piece of content displayed in the body of a Jira issue.
IssuePanel
is the top-level component required for the jira:issuePanel
module.The following context variables are available for issue panels:
localId
- The unique ID of the panel, which makes panel instances distinct from each other if allowMultiple
is set to true
.extensionContext.isNewToIssue
- This variable is set to true
when a panel has just been added to an issue; otherwise, it's false
.The example shows how to access these variables with the useProductContext
UI hook.
1 2import ForgeUI, { IssuePanel } from '@forge/ui';
Name | Type | Required | Description |
---|---|---|---|
children | Array<ForgeComponent> | Yes | A container for displaying multiple components. Can contain any UI kit component. |
actions | Array<IssuePanelAction> | A list of IssuePanelAction components that correspond to items in the actions menu. No more than five actions can be defined. |
1 2import ForgeUI, {IssuePanel, IssuePanelAction, render, Text, useProductContext, useState} from '@forge/ui'; const App = () => { const {localId: panelId, extensionContext: {isNewToIssue}} = useProductContext(); return ( <IssuePanel actions={[ <IssuePanelAction text="Custom action" onClick={() => {}}/> ]}> <Text>Hello, world!</Text> </IssuePanel> ); }; export const run = render( <App/> );
Rate this page: