Skip to content

Commit 85d6be0

Browse files
committed
Fix context bordered colors
1 parent 165b496 commit 85d6be0

File tree

3 files changed

+43
-16
lines changed

3 files changed

+43
-16
lines changed

design-library/src/components/BccAlert/BccAlert.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
@apply text-body-sm relative px-4 py-3.5 rounded-md flex items-start gap-x-2.5 gap-y-1;
44
}
55

6+
.bcc-alert.bordered {
7+
@apply border;
8+
}
9+
610
/* Icon */
711
.bcc-alert-icon {
812
@apply h-5 w-5 shrink-0;

design-library/src/components/BccAlert/BccAlert.vue

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ type Props = {
1818
closeButton?: boolean;
1919
open?: boolean;
2020
contrast?: "light" | "dark";
21-
noBorder?: boolean;
21+
bordered?: boolean;
2222
};
2323
2424
withDefaults(defineProps<Props>(), {
2525
context: "info",
2626
icon: false,
2727
closeButton: false,
2828
open: true,
29-
noBorder: false,
29+
bordered: false,
3030
contrast: "light",
3131
});
3232
@@ -43,11 +43,7 @@ const ContextIcons: Partial<Record<keyof typeof BCC_CONTEXTS, VueComponent>> = {
4343

4444
<template>
4545
<Transition name="bcc-fade">
46-
<div
47-
v-if="open"
48-
class="bcc-alert"
49-
:class="[BCC_CONTEXTS[context], { border: !noBorder }, contrast]"
50-
>
46+
<div v-if="open" class="bcc-alert" :class="[BCC_CONTEXTS[context], { bordered }, contrast]">
5147
<component
5248
v-if="icon"
5349
:is="typeof icon === 'boolean' ? ContextIcons[context] || InfoIcon : icon"

design-library/src/css/contexts.css

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
/* Variants light */
22
.bcc-context-neutral.light {
3-
@apply border-neutral-200 bg-neutral-50 text-neutral-900;
3+
@apply bg-neutral-100 text-neutral-900;
4+
}
5+
.bcc-context-neutral.light.bordered {
6+
@apply border-neutral-200 bg-neutral-50;
47
}
58

69
.bcc-context-danger.light {
@@ -20,35 +23,59 @@
2023
}
2124

2225
.bcc-context-muddy-waters.light {
23-
@apply border-muddy-waters-200 bg-muddy-waters-50 text-muddy-waters-600;
26+
@apply bg-muddy-waters-100 text-muddy-waters-600;
27+
}
28+
.bcc-context-muddy-waters.light.bordered {
29+
@apply border-muddy-waters-200 bg-muddy-waters-50;
2430
}
2531

2632
.bcc-context-mongoose.light {
27-
@apply border-mongoose-200 bg-mongoose-50 text-mongoose-700;
33+
@apply bg-mongoose-100 text-mongoose-700;
34+
}
35+
.bcc-context-mongoose.light.bordered {
36+
@apply border-mongoose-200 bg-mongoose-50;
2837
}
2938

3039
.bcc-context-brand.light {
31-
@apply border-brand-300 bg-brand-50 text-brand-700;
40+
@apply bg-brand-100 text-brand-700;
41+
}
42+
.bcc-context-brand.light.bordered {
43+
@apply border-brand-300 bg-brand-50;
3244
}
3345

3446
.bcc-context-gimblet.light {
35-
@apply border-gimblet-400 bg-gimblet-50 text-gimblet-800;
47+
@apply bg-gimblet-100 text-gimblet-800;
48+
}
49+
.bcc-context-gimblet.light.bordered {
50+
@apply border-gimblet-400 bg-gimblet-50;
3651
}
3752

3853
.bcc-context-blue.light {
39-
@apply border-blue-600 bg-blue-50 text-blue-800;
54+
@apply bg-blue-100 text-blue-800;
55+
}
56+
.bcc-context-blue.light.bordered {
57+
@apply border-blue-500 bg-blue-50;
4058
}
4159

4260
.bcc-context-purple.light {
43-
@apply border-purple-600 bg-purple-50 text-purple-800;
61+
@apply bg-purple-100 text-purple-800;
62+
}
63+
.bcc-context-purple.light.bordered {
64+
@apply border-purple-400 bg-purple-50;
4465
}
4566

4667
.bcc-context-red.light {
47-
@apply border-red-600 bg-red-50 text-red-800;
68+
@apply bg-red-100 text-red-800;
69+
}
70+
.bcc-context-red.light.bordered {
71+
@apply border-red-400 bg-red-50;
4872
}
4973

5074
.bcc-context-green.light {
51-
@apply border-green-600 bg-green-50 text-green-800;
75+
@apply bg-green-100 text-green-800;
76+
}
77+
.bcc-context-green.light.bordered {
78+
@apply border-green-600 bg-green-50;
5279
}
5380

5481
/* Variants dark */

0 commit comments

Comments
 (0)