Skip to content

Commit 0ad68af

Browse files
committed
chore: update all colors for preview role
1 parent 8ae71d3 commit 0ad68af

File tree

6 files changed

+97
-28
lines changed

6 files changed

+97
-28
lines changed

site/src/components/FeatureBadge/FeatureBadge.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
type HTMLAttributes,
1111
type ReactNode,
1212
} from "react";
13+
import tailwindColors from "theme/tailwindColors";
1314
import { docs } from "utils/docs";
1415

1516
/**
@@ -37,15 +38,18 @@ const styles = {
3738
padding: "4px 8px",
3839
lineHeight: 1,
3940
whiteSpace: "nowrap",
40-
border: `1px solid ${theme.palette.divider}`,
41-
color: theme.palette.text.secondary,
42-
backgroundColor: theme.palette.background.default,
41+
border: `1px solid ${theme.roles.preview.outline}`,
42+
color: theme.roles.preview.text,
43+
backgroundColor: theme.roles.preview.background,
4344
borderRadius: "6px",
45+
transition:
46+
"color 0.4s ease-in-out, border-color 0.4s ease-in-out, background-color 0.4s ease-in-out",
4447
}),
4548

4649
badgeHover: (theme) => ({
47-
color: theme.palette.text.primary,
48-
borderColor: theme.palette.text.primary,
50+
color: theme.roles.preview.hover.text,
51+
borderColor: theme.roles.preview.hover.outline,
52+
backgroundColor: theme.roles.preview.hover.background,
4953
}),
5054

5155
badgeLargeText: {

site/src/theme/dark/roles.ts

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Roles } from "../roles";
22
import colors from "../tailwindColors";
33

4-
export default {
4+
const roles: Roles = {
55
danger: {
66
background: colors.orange[950],
77
outline: colors.orange[500],
@@ -143,13 +143,35 @@ export default {
143143
},
144144
},
145145
preview: {
146-
background: colors.violet[950],
147-
outline: colors.violet[500],
148-
text: colors.violet[50],
146+
background: colors.cyan[950],
147+
outline: colors.cyan[600],
148+
text: colors.cyan[400],
149149
fill: {
150-
solid: colors.violet[400],
151-
outline: colors.violet[400],
150+
solid: colors.cyan[400],
151+
outline: colors.cyan[400],
152152
text: colors.white,
153153
},
154+
hover: {
155+
background: colors.zinc[950],
156+
outline: colors.cyan[500],
157+
text: colors.cyan[300],
158+
fill: {
159+
text: colors.white,
160+
outline: colors.cyan[600],
161+
solid: colors.cyan[600],
162+
},
163+
},
164+
disabled: {
165+
background: colors.zinc[950],
166+
outline: colors.cyan[500],
167+
text: colors.cyan[300],
168+
fill: {
169+
text: colors.white,
170+
outline: colors.cyan[600],
171+
solid: colors.cyan[600],
172+
},
173+
},
154174
},
155-
} satisfies Roles;
175+
};
176+
177+
export default roles;

site/src/theme/darkBlue/roles.ts

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Roles } from "../roles";
22
import colors from "../tailwindColors";
33

4-
export default {
4+
const roles: Roles = {
55
danger: {
66
background: colors.orange[950],
77
outline: colors.orange[500],
@@ -143,13 +143,35 @@ export default {
143143
},
144144
},
145145
preview: {
146-
background: colors.violet[950],
147-
outline: colors.violet[500],
148-
text: colors.violet[50],
146+
background: colors.cyan[950],
147+
outline: colors.cyan[600],
148+
text: colors.cyan[400],
149149
fill: {
150-
solid: colors.violet[400],
151-
outline: colors.violet[400],
150+
solid: colors.cyan[400],
151+
outline: colors.cyan[400],
152152
text: colors.white,
153153
},
154+
hover: {
155+
background: colors.zinc[950],
156+
outline: colors.cyan[500],
157+
text: colors.cyan[300],
158+
fill: {
159+
text: colors.white,
160+
outline: colors.cyan[600],
161+
solid: colors.cyan[600],
162+
},
163+
},
164+
disabled: {
165+
background: colors.zinc[950],
166+
outline: colors.cyan[500],
167+
text: colors.cyan[300],
168+
fill: {
169+
text: colors.white,
170+
outline: colors.cyan[600],
171+
solid: colors.cyan[600],
172+
},
173+
},
154174
},
155-
} satisfies Roles;
175+
};
176+
177+
export default roles;

site/src/theme/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// biome-ignore lint/nursery/noRestrictedImports: We still use `Theme` as a basis for our actual theme, for now.
21
import type { Theme as MuiTheme } from "@mui/material/styles";
32
import type * as monaco from "monaco-editor";
43
import type { Branding } from "./branding";

site/src/theme/light/roles.ts

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Roles } from "../roles";
22
import colors from "../tailwindColors";
33

4-
export default {
4+
const roles: Roles = {
55
danger: {
66
background: colors.orange[50],
77
outline: colors.orange[400],
@@ -143,13 +143,35 @@ export default {
143143
},
144144
},
145145
preview: {
146-
background: colors.violet[50],
147-
outline: colors.violet[500],
148-
text: colors.violet[950],
146+
background: colors.cyan[100],
147+
outline: colors.cyan[500],
148+
text: colors.cyan[950],
149149
fill: {
150-
solid: colors.violet[600],
151-
outline: colors.violet[600],
150+
solid: colors.cyan[600],
151+
outline: colors.cyan[600],
152152
text: colors.white,
153153
},
154+
hover: {
155+
background: colors.cyan[50],
156+
outline: colors.cyan[600],
157+
text: colors.cyan[950],
158+
fill: {
159+
outline: colors.cyan[500],
160+
solid: colors.cyan[500],
161+
text: colors.white,
162+
},
163+
},
164+
disabled: {
165+
background: colors.cyan[50],
166+
outline: colors.cyan[800],
167+
text: colors.cyan[200],
168+
fill: {
169+
solid: colors.cyan[800],
170+
outline: colors.cyan[800],
171+
text: colors.white,
172+
},
173+
},
154174
},
155-
} satisfies Roles;
175+
};
176+
177+
export default roles;

site/src/theme/roles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export interface Roles {
3636
/** This isn't quite ready for prime-time, but you're welcome to look around!
3737
* Preview features, experiments, unstable, etc.
3838
*/
39-
preview: Role;
39+
preview: InteractiveRole;
4040
}
4141

4242
/**

0 commit comments

Comments
 (0)