Skip to content

Commit 4f8f84f

Browse files
authored
theme: migrate green theme usage (#105085)
Migrate green color scale usage away from the legacy mapping. green400 → green500 green300 → green400 green200 → green200 green100 → green100 We cannot remove the actual keys from the theme yet due to the ColorOrAlias usages.
1 parent 9320065 commit 4f8f84f

File tree

59 files changed

+112
-98
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+112
-98
lines changed

static/app/components/alerts/pageBanner.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,6 @@ export default Storybook.story('PageBanner', story => {
122122
});
123123

124124
const Green = styled('span')`
125-
color: ${p => p.theme.green400};
125+
color: ${p => p.theme.colors.green500};
126126
font-weight: ${p => p.theme.fontWeight.bold};
127127
`;

static/app/components/arithmeticBuilder/token/function.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ const BaseGridCell = styled('div')`
779779
`;
780780

781781
const FunctionGridCell = styled(BaseGridCell)`
782-
color: ${p => p.theme.green400};
782+
color: ${p => p.theme.colors.green500};
783783
padding-left: ${p => p.theme.space.xs};
784784
`;
785785

static/app/components/checkInTimeline/checkInTimeline.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ const statusStyle: TickStyle<ExampleStatus> = theme => ({
3232
hatchTick: theme.yellow200,
3333
},
3434
[ExampleStatus.OK]: {
35-
labelColor: theme.green400,
36-
tickColor: theme.green300,
35+
labelColor: theme.colors.green500,
36+
tickColor: theme.colors.green400,
3737
},
3838
});
3939

static/app/components/checkInTimeline/utils/testUtils.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ export const testStatusStyle: TickStyle<string> = theme => ({
4040
hatchTick: theme.red200,
4141
},
4242
ok: {
43-
labelColor: theme.green400,
44-
tickColor: theme.green300,
43+
labelColor: theme.colors.green500,
44+
tickColor: theme.colors.green400,
4545
},
4646
missed: {
4747
labelColor: theme.yellow400,

static/app/components/confirm.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,6 @@ export default Storybook.story('Confirm', story => {
231231
});
232232

233233
const ModalTrigger = styled('span')`
234-
background: ${p => p.theme.green200};
234+
background: ${p => p.theme.colors.green200};
235235
padding: ${space(1)};
236236
`;

static/app/components/core/alert/alert.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,11 @@ function getAlertColors(theme: Theme, type: NonNullable<AlertProps['type']>) {
151151
};
152152
case 'success':
153153
return {
154-
background: theme.green300,
155-
backgroundLight: theme.green100,
156-
border: theme.green200,
157-
borderHover: theme.green300,
158-
color: theme.green400,
154+
background: theme.colors.green400,
155+
backgroundLight: theme.colors.green100,
156+
border: theme.colors.green200,
157+
borderHover: theme.colors.green400,
158+
color: theme.colors.green500,
159159
};
160160
case 'error':
161161
return {

static/app/components/core/badge/badge.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function makeBadgeTheme(
3333
};
3434
case 'new':
3535
return {
36-
background: `linear-gradient(90deg, ${theme.blue300}, ${theme.green300})`,
36+
background: `linear-gradient(90deg, ${theme.blue300}, ${theme.colors.green400})`,
3737
color: theme.white,
3838
};
3939
case 'warning':

static/app/components/events/autofix/autofixSetupWriteAccessModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,6 @@ const RepoItem = styled('li')<{isOk?: boolean}>`
169169
gap: ${space(2)};
170170
padding: ${space(1)};
171171
margin-bottom: ${space(0.5)};
172-
background-color: ${p => (p.isOk ? p.theme.green100 : 'transparent')};
172+
background-color: ${p => (p.isOk ? p.theme.colors.green100 : 'transparent')};
173173
border-radius: ${p => p.theme.radius.md};
174174
`;

static/app/components/events/autofix/autofixSolutionEventItem.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ function getEventColor(
5050
title: theme.tokens.content.primary,
5151
icon: isSelected
5252
? isActive
53-
? theme.green400
53+
? theme.colors.green500
5454
: theme.tokens.content.primary
5555
: theme.tokens.content.muted,
5656
iconBorder: isSelected
5757
? isActive
58-
? theme.green400
58+
? theme.colors.green500
5959
: theme.tokens.content.primary
6060
: theme.tokens.content.muted,
6161
};
@@ -248,7 +248,7 @@ const SelectionButton = styled('button')<SelectionButtonProps>`
248248
color: ${p =>
249249
p.actionType === 'delete' || p.actionType === 'close'
250250
? p.theme.red400
251-
: p.theme.green400};
251+
: p.theme.colors.green500};
252252
}
253253
`;
254254

@@ -279,7 +279,7 @@ const StyledTimelineHeader = styled('div')<{isSelected: boolean; isActive?: bool
279279
text-decoration: ${p =>
280280
p.isSelected ? (p.isActive ? 'underline dashed' : 'none') : 'line-through'};
281281
text-decoration-color: ${p =>
282-
p.isSelected ? p.theme.green300 : p.theme.tokens.content.primary};
282+
p.isSelected ? p.theme.colors.green400 : p.theme.tokens.content.primary};
283283
text-decoration-thickness: 1px;
284284
text-underline-offset: 4px;
285285
transition: opacity 0.2s ease;

static/app/components/events/breadcrumbs/utils.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,11 @@ function getBreadcrumbColorConfig(
273273
case BreadcrumbType.HTTP:
274274
case BreadcrumbType.QUERY:
275275
case BreadcrumbType.TRANSACTION:
276-
return {title: theme.green400, icon: theme.green400, iconBorder: theme.green200};
276+
return {
277+
title: theme.colors.green500,
278+
icon: theme.colors.green500,
279+
iconBorder: theme.colors.green200,
280+
};
277281
case BreadcrumbType.USER:
278282
case BreadcrumbType.UI:
279283
return {title: theme.purple400, icon: theme.purple400, iconBorder: theme.purple200};

0 commit comments

Comments
 (0)