Skip to content

Commit bd8c8ff

Browse files
committed
feat(recherche): mise en place A/B Testing sur les labels pour les contributions.
1 parent 3d2674c commit bd8c8ff

1 file changed

Lines changed: 13 additions & 15 deletions

File tree

  • packages/code-du-travail-frontend/src/modules/recherche

packages/code-du-travail-frontend/src/modules/recherche/utils.ts

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ export const getSourceLabel = (
5555
return String(getLabelBySource(source)).toUpperCase();
5656
};
5757

58-
export const badgeColorClasses: Partial<
59-
Record<SearchResult["source"], string>
60-
> = {
58+
export const badgeColorClasses: Partial<Record<SearchResult["source"], string>> = {
6159
themes: css({
6260
backgroundColor: "var(--background-contrast-info) !important", // light decision background background contrast info
6361
color: "var(--text-default-info) !important", // light decision text default info
@@ -67,8 +65,8 @@ export const badgeColorClasses: Partial<
6765
color: "var(--text-action-high-green-archipel) !important", // light option illustration color sun default green archipel
6866
}),
6967
conventions_collectives: css({
70-
backgroundColor: "var(--background-contrast-success) !important", // light decision background background contrast success
71-
color: "var(--text-default-success) !important", // light decision text default success
68+
backgroundColor: "var(--background-alt-green-archipel) !important", // light option illustration color 975 default green archipel
69+
color: "var(--text-action-high-green-archipel) !important", // light option illustration color sun default green archipel
7270
}),
7371
modeles_de_courriers: css({
7472
backgroundColor: "var(--background-alt-purple-glycine) !important", // light option illustration color 950 default purple glycine
@@ -87,23 +85,23 @@ export const badgeColorClasses: Partial<
8785
color: "var(--text-action-high-brown-cafe-creme) !important", // light option illustration color sun default purple glycine
8886
}),
8987
contributions: css({
90-
backgroundColor: "var(--background-alt-yellow-tournesol) !important", // light option illustration color 950 default yellow tournesol
91-
color: "var(--text-action-high-yellow-tournesol) !important", // light option illustration color sun default yellow tournesol
88+
backgroundColor: "var(--background-contrast-success) !important", // light decision background background contrast success
89+
color: "var(--text-default-success) !important", // light decision text default success
9290
}),
9391
fiches_ministere_travail: css({
94-
backgroundColor: "var(--background-alt-green-emeraude) !important", // light option illustration color 975 default green archipel
95-
color: "var(--text-action-high-green-emeraude) !important", // light option illustration color sun default green archipel
92+
backgroundColor: "var(--background-alt-grey) !important", // light option illustration color 975 default green archipel
93+
color: "var(--text-action-high-grey) !important", // light option illustration color sun default green archipel
9694
}),
9795
fiches_service_public: css({
98-
backgroundColor: "var(--background-alt-green-emeraude) !important", // light option illustration color 975 default green archipel
99-
color: "var(--text-action-high-green-emeraude) !important", // light option illustration color sun default green archipel
96+
backgroundColor: "var(--background-alt-grey) !important", // light option illustration color 975 default green archipel
97+
color: "var(--text-action-high-grey) !important", // light option illustration color sun default green archipel
10098
}),
10199
information: css({
102-
backgroundColor: "var(--background-alt-green-emeraude) !important", // light option illustration color 975 default green archipel
103-
color: "var(--text-action-high-green-emeraude) !important", // light option illustration color sun default green archipel
100+
backgroundColor: "var(--background-alt-grey) !important", // light option illustration color 975 default green archipel
101+
color: "var(--text-action-high-grey) !important", // light option illustration color sun default green archipel
104102
}),
105103
page_fiche_ministere_travail: css({
106-
backgroundColor: "var(--background-alt-green-emeraude) !important", // light option illustration color 975 default green archipel
107-
color: "var(--text-action-high-green-archipel) !important", // light option illustration color sun default green archipel
104+
backgroundColor: "var(--background-alt-grey) !important", // light option illustration color 975 default green archipel
105+
color: "var(--text-action-high-grey) !important", // light option illustration color sun default green archipel
108106
}),
109107
};

0 commit comments

Comments
 (0)