diff --git a/src/components/IncidentActions/IncidentActionsComponent.jsx b/src/components/IncidentActions/IncidentActionsComponent.jsx index 69e21c2b..a002e6ad 100644 --- a/src/components/IncidentActions/IncidentActionsComponent.jsx +++ b/src/components/IncidentActions/IncidentActionsComponent.jsx @@ -52,13 +52,19 @@ const IncidentActionsComponent = () => ( {EXTRA_BUTTONS - && EXTRA_BUTTONS.map(({ - label, url, width, height, - }) => ( - <> - - - ))} + && EXTRA_BUTTONS.map(({ + label, url, width, height, tab, + }) => ( + <> + {tab + ? ( + + ) + : ( + + )} + + ))} ); diff --git a/src/components/IncidentActions/subcomponents/ExtraButton.jsx b/src/components/IncidentActions/subcomponents/ExtraButton.jsx index 1c73a5bf..e3dc8370 100644 --- a/src/components/IncidentActions/subcomponents/ExtraButton.jsx +++ b/src/components/IncidentActions/subcomponents/ExtraButton.jsx @@ -19,7 +19,7 @@ const isInt = (value) => { }; const ExtraButton = ({ - label, url, width, height, + label, url, width, height, tab, }) => { // State to control the open state of the popover const [isOpen, setIsOpen] = useState(false); @@ -30,6 +30,22 @@ const ExtraButton = ({ // Function to close the popover const closePopover = () => setIsOpen(false); + if (tab) { + return ( + + ); + } + return ( diff --git a/src/config/constants.js b/src/config/constants.js index 17a43e4c..1764e19a 100644 --- a/src/config/constants.js +++ b/src/config/constants.js @@ -40,14 +40,21 @@ export const DEBUG_UNTIL_DATE = debugParams.get('until') || null; export const EXTRA_BUTTONS = debugParams .getAll('button') .map((button) => { - const [label, url, width, height] = button.split(','); + const [label, url, widthOrTab, height] = button.split(','); if (!label || !url) { return null; } + if (widthOrTab === 'tab') { + return { + label, + url, + tab: true, + }; + } return { label, url, - width, + width: widthOrTab, height, }; })