File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 17
17
import { Link } from 'react-router-dom'
18
18
import { InfoColourBarType } from '../Types'
19
19
import { Tooltip } from '@Common/Tooltip'
20
+ import { Button } from '@Shared/Components'
20
21
import './infoColourBar.scss'
21
22
22
23
const InfoColourBar = ( {
@@ -82,15 +83,23 @@ const InfoColourBar = ({
82
83
83
84
const renderMessageWrapper = ( ) => {
84
85
if ( textConfig ) {
85
- const { heading, description } = textConfig
86
+ const { heading, description, actionButtonConfig } = textConfig
86
87
87
88
return (
88
- < div className = "flexbox-col" >
89
- { heading && < h6 className = "m-0 cn-9 fs-13 fw-6 lh-20 dc__truncate" > { heading } </ h6 > }
89
+ < div className = "flexbox flex-grow-1 dc__content-space dc__align-start" >
90
+ < div className = "flexbox-col" >
91
+ { heading && < h6 className = "m-0 cn-9 fs-13 fw-6 lh-20 dc__truncate" > { heading } </ h6 > }
90
92
91
- < Tooltip content = { description } >
92
- < p className = "dc__truncate--clamp-3 m-0 cn-9 fs-13 fw-4 lh-20" > { description } </ p >
93
- </ Tooltip >
93
+ < Tooltip content = { description } >
94
+ < p className = "dc__truncate--clamp-3 m-0 cn-9 fs-13 fw-4 lh-20" > { description } </ p >
95
+ </ Tooltip >
96
+ </ div >
97
+
98
+ { actionButtonConfig && (
99
+ < Button
100
+ { ...actionButtonConfig }
101
+ />
102
+ ) }
94
103
</ div >
95
104
)
96
105
}
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import {
25
25
Severity ,
26
26
PolicyBlockInfo ,
27
27
TargetPlatformItemDTO ,
28
+ ButtonProps ,
28
29
} from '../Shared'
29
30
import {
30
31
ACTION_STATE ,
@@ -217,6 +218,7 @@ interface InfoColourBarTextConfigType {
217
218
* If given would be shown below the heading (if given)
218
219
*/
219
220
description : string
221
+ actionButtonConfig ?: ButtonProps
220
222
}
221
223
222
224
type InfoColourBarMessageProp = {
You can’t perform that action at this time.
0 commit comments