Skip to content

Commit 567dd8d

Browse files
committed
make everything left aligned, refactor cover for homepage featured images
1 parent 83f1018 commit 567dd8d

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

src/compounds/Item/Item.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const Item = ({ buttonLink, buttonProps, href, fromItemGroup, isLoading, item, o
3434
<div className='row g-0 h-100'>
3535
<div className='col-3'>
3636
<Image
37-
className={orientation === 'horizontal' ? 'img-fluid h-100 rounded-start cover-horizontal' : 'card-img-top'}
37+
className={`cover ${orientation === 'horizontal' ? 'img-fluid h-100 rounded-start' : 'card-img-top'}`}
3838
src={src}
3939
alt={alt}
4040
/>
@@ -55,7 +55,7 @@ const Item = ({ buttonLink, buttonProps, href, fromItemGroup, isLoading, item, o
5555
) : (
5656
<>
5757
<Image
58-
className={orientation === 'horizontal' ? 'img-fluid h-100 rounded-start cover' : 'card-img-top'}
58+
className={`cover ${orientation === 'horizontal' ? 'img-fluid h-100 rounded-start' : 'card-img-top'}`}
5959
src={src}
6060
alt={alt}
6161
/>

src/compounds/Item/item.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
white-space: nowrap;
33
}
44

5-
.cover-horizontal {
5+
.cover {
66
object-fit: cover;
77
height: 200px;
88
width: 100%;
99
}
1010

1111
.link-hover:hover {
1212
opacity: .8;
13-
}
13+
}

src/compounds/ItemPage/ItemPage.jsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,22 @@ import PropTypes from 'prop-types'
33
import { Button, Row, Col } from 'react-bootstrap'
44
import Image from '../../components/Image/Image'
55
import Title from '../../components/Title/Title'
6+
import TextBox from '../../components/TextBox/TextBox'
67

78
const ItemPage = ({ title, titleStyle, description, descriptionStyle, img }) => {
89
// sets a default width while still allowing width to be overridden
910
img = { width: 400, ...img }
1011

1112
return (
1213
<main className='container py-5'>
13-
<Title title={title} style={titleStyle} addClass='text-center text-md-start'/>
14+
<Title title={title} style={titleStyle}/>
1415
<Row className='mt-3'>
15-
<Col xs={12} md={6} className='text-center text-md-start d-flex flex-column'>
16-
{description}
16+
<Col xs={12} md={6} className='d-flex flex-column'>
17+
<TextBox text={description} style={descriptionStyle} size='medium' />
1718
{/* TODO(summer-cook): Update this button's href so it is pointing at the item's form instead of blank request form */}
18-
<Button href='/requests/new' className='mt-4 align-self-center align-self-md-start'>Initiate Request</Button>
19+
<Button href='/requests/new' className='align-self-start mt-4'>Initiate Request</Button>
1920
</Col>
20-
<Col xs={12} md={6} className='mt-4 mt-md-0 me-md-auto d-flex justify-content-center justify-content-md-end'>
21+
<Col xs={12} md={6} className='mt-4 mt-md-0 me-md-auto d-flex justify-content-start justify-content-md-end'>
2122
<Image {...img} />
2223
</Col>
2324
</Row>

0 commit comments

Comments
 (0)