Skip to content

Commit f0dd95d

Browse files
authored
Merge pull request #113 from scientist-softserv/styling-for-service-images
Styling for service images
2 parents 000516e + 00572e5 commit f0dd95d

File tree

4 files changed

+18
-25
lines changed

4 files changed

+18
-25
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: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
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+
}
14+

src/compounds/ItemPage/ItemPage.jsx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
import React from 'react'
22
import PropTypes from 'prop-types'
3+
import { Button, Row, Col } from 'react-bootstrap'
34
import Image from '../../components/Image/Image'
45
import TextBox from '../../components/TextBox/TextBox'
56
import Title from '../../components/Title/Title'
6-
import './item-page.css'
77

88
const ItemPage = ({ title, titleStyle, description, descriptionStyle, img }) => {
99
// sets a default width while still allowing width to be overridden
1010
img = { width: 400, ...img }
1111

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

src/compounds/ItemPage/item-page.css

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)