File tree Expand file tree Collapse file tree 7 files changed +59
-18
lines changed Expand file tree Collapse file tree 7 files changed +59
-18
lines changed Original file line number Diff line number Diff line change 79
79
80
80
@if ($color ) {
81
81
color : $color ;
82
-
82
+
83
83
@include svg-styles ($color );
84
84
}
85
85
}
216
216
& --neutral {
217
217
@include button-variant-styles ($background , var (--N700 ), $border-color );
218
218
}
219
+
220
+ & --neutral-n0 {
221
+ @include button-variant-styles ($background , var (--N0 ), $border-color );
222
+ }
223
+
224
+ & --neutral-white {
225
+ @include button-variant-styles ($background , var (--white ), $border-color );
226
+ }
219
227
}
220
228
221
229
// Pseudo states for border-less button
243
251
& --neutral {
244
252
@include pseudo-states (var (--N100 ), var (--N200 ));
245
253
}
254
+
255
+ & --neutral-n0 {
256
+ @include pseudo-states (var (--N000 ), var (--N100 ));
257
+ }
258
+
259
+ & --neutral-white {
260
+ @include pseudo-states (var (--white ), var (--N100 ));
261
+ }
246
262
}
247
263
248
264
// Overrides for text button
253
269
& --negative-grey ,
254
270
& --positive ,
255
271
& --warning ,
256
- & --neutral {
272
+ & --neutral ,
273
+ & --neutral-n0 ,
274
+ & --neutral-white {
257
275
padding : 0 !important ;
258
276
min-width : 0 !important ;
259
277
border : none ;
279
297
text-decoration : none ;
280
298
}
281
299
}
282
- }
300
+ }
Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ export enum ButtonStyleType {
35
35
positive = 'positive' ,
36
36
warning = 'warning' ,
37
37
neutral = 'neutral' ,
38
+ neutralN0 = 'neutral-n0' ,
39
+ neutralWhite = 'neutral-white' ,
38
40
}
39
41
40
42
export enum ButtonComponentType {
Original file line number Diff line number Diff line change 14
14
* limitations under the License.
15
15
*/
16
16
17
- import { ComponentSizeType } from '@Shared/constants'
17
+ import { ComponentSizeType , VARIANT_TO_BG_MAP , VARIANT_TO_BORDER_MAP } from '@Shared/constants'
18
18
import { deriveBorderRadiusAndBorderClassFromConfig } from '@Shared/Helpers'
19
19
20
20
import { Button } from '../Button'
21
21
import {
22
22
CONTAINER_SIZE_TO_BUTTON_SIZE ,
23
23
CONTAINER_SIZE_TO_CLASS_MAP ,
24
24
SIZE_TO_ICON_CLASS_MAP ,
25
- VARIANT_TO_BG_MAP ,
26
25
VARIANT_TO_ICON_MAP ,
27
26
} from './constants'
28
27
import { InfoBlockProps } from './types'
@@ -38,7 +37,7 @@ const InfoBlock = ({
38
37
borderRadiusConfig,
39
38
borderConfig,
40
39
} : InfoBlockProps ) => {
41
- const baseContainerClass = `${ CONTAINER_SIZE_TO_CLASS_MAP [ size ] } ${ VARIANT_TO_BG_MAP [ variant ] } ${ deriveBorderRadiusAndBorderClassFromConfig ( { borderConfig, borderRadiusConfig } ) } w-100 py-8 br-4 bw-1`
40
+ const baseContainerClass = `${ CONTAINER_SIZE_TO_CLASS_MAP [ size ] } ${ VARIANT_TO_BG_MAP [ variant ] } ${ VARIANT_TO_BORDER_MAP [ variant ] } ${ deriveBorderRadiusAndBorderClassFromConfig ( { borderConfig, borderRadiusConfig } ) } w-100 py-8 br-4 bw-1`
42
41
const iconClass = `dc__no-shrink flex dc__fill-available-space ${ SIZE_TO_ICON_CLASS_MAP [ size ] } `
43
42
const icon = customIcon ?? VARIANT_TO_ICON_MAP [ variant ]
44
43
Original file line number Diff line number Diff line change @@ -20,15 +20,6 @@ import { ButtonProps } from '../Button'
20
20
import { Icon } from '../Icon'
21
21
import { InfoBlockProps } from './types'
22
22
23
- export const VARIANT_TO_BG_MAP : Record < InfoBlockProps [ 'variant' ] , string > = {
24
- error : 'bcr-1 er-2' ,
25
- help : 'bcv-1 ev-2' ,
26
- information : 'bcb-1 eb-2' ,
27
- success : 'bcg-1 eg-2' ,
28
- warning : 'bcy-1 ey-2' ,
29
- neutral : 'bcn-1 en-2' ,
30
- }
31
-
32
23
export const VARIANT_TO_ICON_MAP : Record < InfoBlockProps [ 'variant' ] , InfoBlockProps [ 'customIcon' ] > = {
33
24
error : < Icon name = "ic-error" color = "R500" /> ,
34
25
help : < Icon name = "ic-help-outline" color = "V500" /> ,
Original file line number Diff line number Diff line change 16
16
17
17
import { OptionType } from '@Common/Types'
18
18
19
+ import { InfoBlockProps } from './Components'
19
20
import { CDMaterialSidebarType , ConfigKeysWithLockType , ConfigurationType } from './types'
20
21
21
22
export const ARTIFACT_STATUS = {
@@ -553,3 +554,30 @@ export const Routes = {
553
554
export const ENTERPRISE_SUPPORT_LINK = 'enterprise@devtron.ai'
554
555
555
556
export const INVALID_LICENSE_KEY = 'inValid'
557
+
558
+ export const VARIANT_TO_BG_MAP : Record < InfoBlockProps [ 'variant' ] , string > = {
559
+ error : 'bcr-1' ,
560
+ help : 'bcv-1' ,
561
+ information : 'bcb-1' ,
562
+ success : 'bcg-1' ,
563
+ warning : 'bcy-1' ,
564
+ neutral : 'bcn-1' ,
565
+ }
566
+
567
+ export const VARIANT_TO_ICON_COLOR_MAP : Record < InfoBlockProps [ 'variant' ] , string > = {
568
+ error : 'R500' ,
569
+ help : 'V500' ,
570
+ information : 'B500' ,
571
+ success : 'G500' ,
572
+ warning : 'Y700' ,
573
+ neutral : 'N500' ,
574
+ }
575
+
576
+ export const VARIANT_TO_BORDER_MAP : Record < InfoBlockProps [ 'variant' ] , string > = {
577
+ error : 'er-2' ,
578
+ help : 'ev-2' ,
579
+ information : 'eb-2' ,
580
+ success : 'eg-2' ,
581
+ warning : 'ey-2' ,
582
+ neutral : 'en-2' ,
583
+ }
Original file line number Diff line number Diff line change @@ -57,6 +57,9 @@ export interface customEnv {
57
57
ENABLE_SCOPED_VARIABLES ?: boolean
58
58
DEFAULT_CI_TRIGGER_TYPE_MANUAL : boolean
59
59
ANNOUNCEMENT_BANNER_MSG ?: string
60
+ ANNOUNCEMENT_BANNER_TYPE ?: string
61
+ ANNOUNCEMENT_BANNER_BUTTON_TEXT ?: string
62
+ ANNOUNCEMENT_BANNER_BUTTON_LINK ?: string
60
63
HIDE_DEFAULT_CLUSTER ?: boolean
61
64
GLOBAL_API_TIMEOUT ?: number
62
65
TRIGGER_API_TIMEOUT ?: number
You can’t perform that action at this time.
0 commit comments