Skip to content

Commit decbdb9

Browse files
committed
Replace orange active color with yellow and purple in IconAccentButton
- add orange color --vscode-charts-orange - add yellow button color - add purple button color - remove orange color ├── README.md ├── apps │ └── editor │ └── src │ ├── constants │ │ └── instructions.ts │ └── features │ └── search-files │ └── utils │ └── search-files-by-intelligent.ts └── packages └── ui └── src ├── components │ └── editor │ └── prompt │ └── IconAccentButton │ ├── IconAccentButton.module.scss │ └── IconAccentButton.tsx └── styles └── foundation └── _colors.scss
1 parent 66ccf06 commit decbdb9

4 files changed

Lines changed: 27 additions & 23 deletions

File tree

‎packages/ui/src/components/editor/prompt/IconAccentButton/IconAccentButton.module.scss‎

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,29 +56,42 @@
5656
}
5757
}
5858

59-
&.button--orange {
60-
background-color: var(--cwc-bg-yellow);
59+
&.button--red {
60+
background-color: var(--cwc-bg-red);
6161

6262
.button__icon,
6363
.button__label {
64-
color: var(--cwc-text-color-yellow);
64+
color: var(--cwc-text-color-red);
6565
}
6666

6767
&:hover {
68-
background-color: var(--cwc-bg-yellow);
68+
background-color: var(--cwc-bg-red);
6969
}
7070
}
7171

72-
&.button--red {
73-
background-color: var(--cwc-bg-red);
72+
&.button--purple {
73+
background-color: var(--cwc-bg-purple);
7474

7575
.button__icon,
7676
.button__label {
77-
color: var(--cwc-text-color-red);
77+
color: var(--cwc-text-color-purple);
7878
}
7979

8080
&:hover {
81-
background-color: var(--cwc-bg-red);
81+
background-color: var(--cwc-bg-purple);
82+
}
83+
}
84+
85+
&.button--yellow {
86+
background-color: var(--cwc-bg-yellow);
87+
88+
.button__icon,
89+
.button__label {
90+
color: var(--cwc-text-color-yellow);
91+
}
92+
93+
&:hover {
94+
background-color: var(--cwc-bg-yellow);
8295
}
8396
}
8497
}

‎packages/ui/src/components/editor/prompt/IconAccentButton/IconAccentButton.stories.tsx‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,6 @@ export const ActiveGreen = () => (
4949
/>
5050
)
5151

52-
export const ActiveOrange = () => (
53-
<IconAccentButton
54-
label="Active Orange Button"
55-
icon="check"
56-
is_active
57-
active_color="orange"
58-
on_click={() => console.log('Clicked')}
59-
/>
60-
)
61-
6252
export const ActiveRed = () => (
6353
<IconAccentButton
6454
label="Active Red Button"

‎packages/ui/src/components/editor/prompt/IconAccentButton/IconAccentButton.tsx‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export namespace IconAccentButton {
88
icon: string
99
is_compact?: boolean
1010
is_active?: boolean
11-
active_color?: 'blue' | 'green' | 'orange' | 'red'
11+
active_color?: 'blue' | 'green' | 'red' | 'yellow' | 'purple'
1212
on_click?: () => void
1313
}
1414
}
@@ -23,9 +23,11 @@ export const IconAccentButton: FC<IconAccentButton.Props> = (props) => {
2323
props.is_active && props.active_color == 'blue',
2424
[styles['button--green']]:
2525
props.is_active && props.active_color == 'green',
26-
[styles['button--orange']]:
27-
props.is_active && props.active_color == 'orange',
28-
[styles['button--red']]: props.is_active && props.active_color == 'red'
26+
[styles['button--red']]: props.is_active && props.active_color == 'red',
27+
[styles['button--purple']]:
28+
props.is_active && props.active_color == 'purple',
29+
[styles['button--yellow']]:
30+
props.is_active && props.active_color == 'yellow'
2931
})}
3032
onClick={props.on_click}
3133
type="button"

‎packages/ui/src/styles/foundation/_colors.scss‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
--cwc-text-color-blue: var(--vscode-charts-blue);
1111
--cwc-text-color-purple: var(--vscode-charts-purple);
1212
--cwc-text-color-yellow: var(--vscode-charts-yellow);
13-
1413
--cwc-bg-primary: color-mix(
1514
in srgb,
1615
var(--vscode-foreground) 20%,

0 commit comments

Comments
 (0)