Skip to content

Commit 9b92243

Browse files
committed
merge conflicts
2 parents 02b0216 + b3085ee commit 9b92243

File tree

5 files changed

+47
-34
lines changed

5 files changed

+47
-34
lines changed

src/assets/theme/bootstrap-preview.scss

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// these colors match what is in the webstore, and must be updated here as well. this file enables us to see the preview of what these overrides will look like without actually importing these from here into the webstore project.
1+
// these colors and variables match what is in the webstore's theme.module.scss file. this file enables us to see the preview of what these overrides will look like without actually importing these from here into the webstore project. In order to see a preview in storybook of how components will look with custom colors, these values must be updated.
22

33
$primary: #333333;
44
$secondary: #CCCCCC;
@@ -10,5 +10,17 @@ $light: #f8f9fa;
1010
$dark: #212529;
1111
$white: #ffffff;
1212

13-
@import '../../../node_modules/bootstrap/scss/bootstrap.scss'
13+
// these imports must be AFTER the theme color overrides above in order to properly override bootstrap's colors, but before the theme maps.
14+
@import "../../../node_modules/bootstrap/scss/functions";
15+
@import "../../../node_modules/bootstrap/scss/variables";
16+
@import "../../../node_modules/bootstrap/scss/mixins";
1417

18+
// 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
19+
$custom-colors: (
20+
"light-2": darken($light, 3%),
21+
"light-3": darken($light, 10%)
22+
);
23+
$theme-colors: map-merge($theme-colors, $custom-colors);
24+
25+
// the full bootstrap import must be last in order to properly override bootstrap's theme maps
26+
@import '../../../node_modules/bootstrap/scss/bootstrap.scss';

src/compounds/RequestItem/RequestItem.jsx

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,33 @@ import Badge from '../../components/Badge/Badge'
44
import Image from '../../components/Image/Image'
55
import TextBox from '../../components/TextBox/TextBox'
66
import Title from '../../components/Title/Title'
7-
import './request-item.css'
7+
import './request-item.scss'
88

99
const RequestItem = React.forwardRef(({ index, request }, ref) => {
1010
const { createdAt, description, href, img, title, status, updatedAt } = request
1111
const { backgroundColor, text, textColor } = status
1212
const image = { ...img, height: 70, width: 70 }
1313

1414
return (
15-
<article className='request-item mt-2'>
16-
<Image {...image} />
17-
<div className='request-item-details'>
18-
<a href={href} ref={ref} className='link pointer-cursor'>
19-
<Title title={title} size='small' />
20-
</a>
21-
<TextBox text={description} />
15+
<article
16+
className={`request-item p-3 d-flex flex-column flex-md-row justify-content-between gap-3 bg-light
17+
${index % 2 === 0 ? ' bg-light' : ' bg-light-2'}`}
18+
>
19+
<div className='d-flex flex-column flex-sm-row gap-3 request-item-details'>
20+
<Image {...image} addClass='align-self-md-center' />
21+
<div className='align-self-sm-center'>
22+
<a href={href} ref={ref} className='link pointer-cursor'>
23+
<Title title={title} size='small' />
24+
</a>
25+
<TextBox text={description} />
26+
</div>
2227
</div>
23-
<div className='status'>
28+
<div className='status bg-light-3 p-2 rounded mt-4 mt-md-0'>
2429
<Badge
2530
backgroundColor={backgroundColor}
2631
text={text}
2732
textColor={textColor}
33+
addClass='mb-2'
2834
/>
2935
<TextBox text={`Created: ${createdAt}`} />
3036
<TextBox text={`Updated: ${updatedAt}`} />
@@ -46,4 +52,10 @@ RequestItem.propTypes = {
4652
}).isRequired,
4753
}
4854

55+
RequestItem.defaultProps = {
56+
index: null,
57+
}
58+
59+
RequestItem.displayName = 'Request Item'
60+
4961
export default RequestItem

src/compounds/RequestItem/request-item.css

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.request-item-details {
2+
flex: 2;
3+
}
4+
5+
.status {
6+
max-height: 175px;
7+
@media (min-width: 768px) {
8+
width: 260px;
9+
}
10+
}

src/compounds/RequestList/RequestList.stories.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ Default.args = {
2626
},
2727
{
2828
createdAt: 'November 15, 2022',
29-
description: 'this is a test.',
29+
// eslint-disable-next-line max-len
30+
description: 'General Information When do you plan to work with this supplier? Urgently Name of supplier: Alisha Supplier web address: http://scientist.com Is this new supplier onboarding request related to any of the following areas: Research area: In Vivo Contact Information Supplier contact name: Alisha Evans Supplier email a...',
3031
href: '/request/706D8F',
3132
id: 2,
3233
img: defaultImage,

0 commit comments

Comments
 (0)