Skip to content

Commit

Permalink
adjust image responsiveness
Browse files Browse the repository at this point in the history
  • Loading branch information
markvanaalst committed Mar 8, 2024
1 parent 1d3c0ce commit 393c17f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const settings = {
speed: 500,
autoplaySpeed: 5000,
slidesToShow: 1,
adaptiveHeight: true,
slidesToScroll: 1,
appendDots: (dots: React.ReactNode) => (
<div style={{ bottom: '10px' }}>
Expand Down Expand Up @@ -103,12 +102,21 @@ export const Default = (props: VenueProps): JSX.Element => {
{props.fields.VenueImages != null && (
<Box
minWidth={{ base: '100%', md: '50%' }}
position={'relative'}
as={SliderWrapper}
mt={{ base: '10', md: '0' }}
>
<Slider {...settings} ref={() => setSlider(slider)}>
{props.fields.VenueImages?.map((image, index) => (
<Image src={image.url} key={index} borderRadius={{ base: 'none', md: '2xl' }} />
<Image
src={image.url}
key={index}
borderRadius={{ base: 'none', md: '2xl' }}
width="full"
height="100%"
maxHeight="400px"
objectFit="cover"
/>
))}
</Slider>
</Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@ export const Default: Story = {
VenueImages: [
{
name: 'Mock Item',
url: 'https://placehold.co/450x300/000000/FFF/png?text=Image+1',
url: 'https://placehold.co/450x400/000000/FFF/png?text=Image+1',
fields: {},
},
{
name: 'Mock Item',
url: 'https://placehold.co/450x300/CC0000/FFF/png?text=Image+2',
url: 'https://placehold.co/450x400/CC0000/FFF/png?text=Image+2',
fields: {},
},
{
name: 'Mock Item',
url: 'https://placehold.co/450x300/0000FF/FFF/png?text=Image+3',
url: 'https://placehold.co/450x400/0000FF/FFF/png?text=Image+3',
fields: {},
},
],
Expand Down

0 comments on commit 393c17f

Please sign in to comment.