Skip to content

Commit a7e19f9

Browse files
committed
expand the $custom-colors options
1 parent ddcc621 commit a7e19f9

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

src/assets/theme/bootstrap-preview.scss

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,24 @@ $black: #000000;
1818

1919
// create our own custom colors map, and merge it with bootstrap's theme-colors map to generate utility functions that can be used throughout the map
2020
$custom-colors: (
21-
'light-2': darken($light, 3%),
21+
'light-1': darken($light, 3%),
22+
'light-2': darken($light, 5%),
2223
'light-3': darken($light, 10%),
23-
'secondary-2': darken($secondary, 3%),
24+
'light-4': darken($light, 20%),
25+
'light-5': $light,
26+
'light-6': lighten($light, 3%),
27+
'light-7': lighten($light, 5%),
28+
'light-8': lighten($light, 10%),
29+
'light-9': lighten($light, 20%),
30+
'secondary-1': darken($secondary, 3%),
31+
'secondary-2': darken($secondary, 5%),
2432
'secondary-3': darken($secondary, 10%),
33+
'secondary-4': darken($secondary, 20%),
34+
'secondary-5': $secondary,
35+
'secondary-6': lighten($secondary, 3%),
36+
'secondary-7': lighten($secondary, 5%),
37+
'secondary-8': lighten($secondary, 10%),
38+
'secondary-9': lighten($secondary, 20%),
2539
'black': $black,
2640
'white': $white,
2741
);

src/components/StatusBar/StatusBar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const StatusBar = ({ backgroundColor, statusArray, apiRequestStatus, addClass })
4343
StatusBar.propTypes = {
4444
addClass: PropTypes.string,
4545
apiRequestStatus: PropTypes.string.isRequired,
46-
// the webstore is currently configured to only accept 'light' or 'secondary' as the backgroundColor options.
46+
// the webstore is currently configured to only accept 'light' or 'secondary' as the backgroundColor options because of the $custom-colors variable.
4747
// we are not limiting the prop type to only those two strings because the webstore options may expand in the future.
4848
backgroundColor: PropTypes.string,
4949
statusArray: PropTypes.arrayOf(PropTypes.shape({})).isRequired,

src/compounds/RequestItem/RequestItem.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const RequestItem = React.forwardRef(({ backgroundColor, index, request }, ref)
1010
const { createdAt, description, href, img, title, status, updatedAt } = request
1111
const { text, textColor } = status
1212
const image = { ...img, height: 70, width: 70 }
13-
const bg = index % 2 === 0 ? `bg-${backgroundColor}` : `bg-${backgroundColor}-2`
13+
const bg = index % 2 === 0 ? `bg-${backgroundColor}` : `bg-${backgroundColor}-1`
1414

1515
return (
1616
<article

0 commit comments

Comments
 (0)