fix: Fullscreen bein weird

Signed-off-by: Avior <github@avior.me>
This commit is contained in:
Florian Bouillon 2022-10-23 16:30:49 +02:00
parent 2b75a3a68b
commit 197617e2d5
Signed by: Florian Bouillon
GPG Key ID: BEEAF3722D0EBF64
2 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,10 @@
import { Meta, Story } from '@storybook/react/types-6-0'
import React from 'react'
import Component from '.'
export default {
title: 'DZEIO/Image',
component: Component
} as Meta
export const Image: Story<any> = (args: any) => <Component imageProps={{src: '/90-38.svg', width: 90, height: 38}} fullscreen {...args} />

View File

@ -69,6 +69,7 @@ export default class Image extends React.Component<Props, States> {
priority
quality={100}
{...this.props.imageProps}
layout={this.state.image ? 'fill' : this.props.imageProps.layout}
objectFit="contain"
/>
</div>