@@ -2,7 +2,6 @@ import type { PropsWithChildren, FC } from "react";
2
2
import Tooltip from "@mui/material/Tooltip" ;
3
3
import { type Interpolation , type Theme } from "@emotion/react" ;
4
4
import { Stack } from "components/Stack/Stack" ;
5
- import colors from "theme/tailwind" ;
6
5
7
6
const styles = {
8
7
badge : {
@@ -22,14 +21,17 @@ const styles = {
22
21
enabledBadge : ( theme ) => ( {
23
22
border : `1px solid ${ theme . experimental . roles . success . outline } ` ,
24
23
backgroundColor : theme . experimental . roles . success . background ,
24
+ color : theme . experimental . roles . success . text ,
25
25
} ) ,
26
26
errorBadge : ( theme ) => ( {
27
27
border : `1px solid ${ theme . experimental . roles . error . outline } ` ,
28
28
backgroundColor : theme . experimental . roles . error . background ,
29
+ color : theme . experimental . roles . error . text ,
29
30
} ) ,
30
31
warnBadge : ( theme ) => ( {
31
32
border : `1px solid ${ theme . experimental . roles . warning . outline } ` ,
32
33
backgroundColor : theme . experimental . roles . warning . background ,
34
+ color : theme . experimental . roles . warning . text ,
33
35
} ) ,
34
36
} satisfies Record < string , Interpolation < Theme > > ;
35
37
@@ -42,10 +44,9 @@ export const EntitledBadge: FC = () => {
42
44
} ;
43
45
44
46
interface HealthyBadge {
45
- derpOnly : boolean ;
47
+ derpOnly ? : boolean ;
46
48
}
47
- export const HealthyBadge : FC < HealthyBadge > = ( props ) => {
48
- const { derpOnly } = props ;
49
+ export const HealthyBadge : FC < HealthyBadge > = ( { derpOnly } ) => {
49
50
return (
50
51
< span css = { [ styles . badge , styles . enabledBadge ] } >
51
52
{ derpOnly ? "Healthy (DERP only)" : "Healthy" }
@@ -79,8 +80,9 @@ export const DisabledBadge: FC = () => {
79
80
css = { [
80
81
styles . badge ,
81
82
( theme ) => ( {
82
- border : `1px solid ${ theme . palette . divider } ` ,
83
- backgroundColor : theme . palette . background . paper ,
83
+ border : `1px solid ${ theme . experimental . l1 . outline } ` ,
84
+ backgroundColor : theme . experimental . l1 . background ,
85
+ color : theme . experimental . l1 . text ,
84
86
} ) ,
85
87
] }
86
88
>
@@ -95,8 +97,9 @@ export const EnterpriseBadge: FC = () => {
95
97
css = { [
96
98
styles . badge ,
97
99
( theme ) => ( {
98
- backgroundColor : theme . palette . info . dark ,
99
- border : `1px solid ${ theme . palette . info . light } ` ,
100
+ backgroundColor : theme . experimental . roles . info . background ,
101
+ border : `1px solid ${ theme . experimental . roles . info . outline } ` ,
102
+ color : theme . experimental . roles . info . text ,
100
103
} ) ,
101
104
] }
102
105
>
@@ -105,16 +108,33 @@ export const EnterpriseBadge: FC = () => {
105
108
) ;
106
109
} ;
107
110
111
+ export const BetaBadge : FC = ( ) => {
112
+ return (
113
+ < span
114
+ css = { [
115
+ styles . badge ,
116
+ ( theme ) => ( {
117
+ border : `1px solid ${ theme . experimental . roles . preview . outline } ` ,
118
+ backgroundColor : theme . experimental . roles . preview . background ,
119
+ color : theme . experimental . roles . preview . text ,
120
+ } ) ,
121
+ ] }
122
+ >
123
+ Beta
124
+ </ span >
125
+ ) ;
126
+ } ;
127
+
108
128
export const AlphaBadge : FC = ( ) => {
109
129
return (
110
130
< span
111
131
css = { [
112
132
styles . badge ,
113
- {
114
- border : `1px solid ${ colors . violet [ 600 ] } ` ,
115
- backgroundColor : colors . violet [ 950 ] ,
116
- color : colors . violet [ 50 ] ,
117
- } ,
133
+ ( theme ) => ( {
134
+ border : `1px solid ${ theme . experimental . roles . preview . outline } ` ,
135
+ backgroundColor : theme . experimental . roles . preview . background ,
136
+ color : theme . experimental . roles . preview . text ,
137
+ } ) ,
118
138
] }
119
139
>
120
140
Alpha
@@ -127,11 +147,11 @@ export const DeprecatedBadge: FC = () => {
127
147
< span
128
148
css = { [
129
149
styles . badge ,
130
- {
131
- border : `1px solid ${ colors . orange [ 600 ] } ` ,
132
- backgroundColor : colors . orange [ 950 ] ,
133
- color : colors . orange [ 50 ] ,
134
- } ,
150
+ ( theme ) => ( {
151
+ border : `1px solid ${ theme . experimental . roles . danger . outline } ` ,
152
+ backgroundColor : theme . experimental . roles . danger . background ,
153
+ color : theme . experimental . roles . danger . text ,
154
+ } ) ,
135
155
] }
136
156
>
137
157
Deprecated
0 commit comments