Skip to content

Commit 4710a47

Browse files
committed
Add new shades of green, red and yellow
1 parent eb80fdd commit 4710a47

File tree

2 files changed

+46
-6
lines changed

2 files changed

+46
-6
lines changed

src/pattern-library/components/patterns/ColorsPage.tsx

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,29 @@ const slateExamples = (
5555

5656
const stateExamples = (
5757
<>
58-
<ColorSwatch colorClass="bg-green-success" colorName="green-success" />
59-
<ColorSwatch colorClass="bg-yellow-notice" colorName="yellow-notice" />
60-
<ColorSwatch colorClass="bg-red-error" colorName="red-error" />
58+
<ColorSwatch
59+
colorClass="bg-green-success"
60+
colorName="green-success (green alias)"
61+
/>
62+
<ColorSwatch
63+
colorClass="bg-yellow-notice"
64+
colorName="yellow-notice (yellow alias)"
65+
/>
66+
<ColorSwatch colorClass="bg-red-error" colorName="red-error (red alias)" />
67+
</>
68+
);
69+
70+
const highlightingExamples = (
71+
<>
72+
<ColorSwatch colorClass="bg-green-light" colorName="green-light" />
73+
<ColorSwatch colorClass="bg-green" colorName="green" />
74+
<ColorSwatch colorClass="bg-green-dark" colorName="green-dark" />
75+
<ColorSwatch colorClass="bg-yellow-light" colorName="yellow-light" />
76+
<ColorSwatch colorClass="bg-yellow" colorName="yellow" />
77+
<ColorSwatch colorClass="bg-yellow-dark" colorName="yellow-dark" />
78+
<ColorSwatch colorClass="bg-red-light" colorName="red-light" />
79+
<ColorSwatch colorClass="bg-red" colorName="red" />
80+
<ColorSwatch colorClass="bg-red-dark" colorName="red-dark" />
6181
</>
6282
);
6383

@@ -90,6 +110,12 @@ export default function ColorsPage() {
90110
</div>
91111
</Library.SectionL2>
92112

113+
<Library.SectionL2 title="Highlighting">
114+
<div className="my-4 flex flex-row flex-wrap gap-4">
115+
{highlightingExamples}
116+
</div>
117+
</Library.SectionL2>
118+
93119
<Library.SectionL2 title="State indicators">
94120
<div className="my-4 flex flex-row flex-wrap gap-4">
95121
{stateExamples}

src/tailwind.preset.js

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ import { scrollShadows } from './tailwind.scroll-shadows.js';
77
// Equivalent to spacing value 11; minimum touch-target size
88
const minimumTouchDimension = '44px';
99

10+
// Default colors
11+
const green = '#00a36d';
12+
const yellow = '#fbc168';
13+
const red = '#d93c3f';
14+
1015
export default /** @type {Partial<import('tailwindcss').Config>} */ ({
1116
theme: {
1217
extend: {
@@ -50,13 +55,22 @@ export default /** @type {Partial<import('tailwindcss').Config>} */ ({
5055
focus: '#59a7e8',
5156
},
5257
green: {
53-
success: '#00a36d',
58+
light: '#dfebe7',
59+
DEFAULT: green,
60+
dark: '#005c3d',
61+
success: green,
5462
},
5563
yellow: {
56-
notice: '#fbc168',
64+
light: '#fef7ec',
65+
DEFAULT: yellow,
66+
dark: '#774903',
67+
notice: yellow,
5768
},
5869
red: {
59-
error: '#d93c3f',
70+
light: '#f0e2e3',
71+
DEFAULT: red,
72+
dark: '#891b1d',
73+
error: red,
6074
},
6175
brand: {
6276
dark: '#84141e',

0 commit comments

Comments
 (0)