Rate this page:
Renders content of a jira:customField
module, which lets users add specific pieces of information to a Jira issue.
For more information, see Jira custom field and Jira custom field type.
A CustomField
in view mode:
A CustomField
in edit mode:
function
defined in the app manifest.1 2import ForgeUI, { CustomField } from "@forge/ui";
Name | Type | Required | Description |
---|---|---|---|
children | Array | Yes | The view code for the custom field. Can only contain Code , Image , Text , Tooltip , Tag , TagGroup , User , and UserGroup components. |
1 2import ForgeUI, { render, useProductContext, CustomField, Text, StatusLozenge, } from "@forge/ui"; const App = () => { const { extensionContext: { fieldValue }, } = useProductContext(); const fieldAppearance = (value) => { switch (value) { case "medium": return "success"; case "high": return "removed"; default: return "default"; } }; return ( <CustomField> <Text> <StatusLozenge text={fieldValue} appearance={fieldAppearance(fieldValue)} /> </Text> </CustomField> ); }; export const run = render(<App />);
Rate this page: