diff --git a/src/Image/Image.stories.tsx b/src/Image/Image.stories.tsx new file mode 100644 index 0000000..a3f389b --- /dev/null +++ b/src/Image/Image.stories.tsx @@ -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 = (args: any) => diff --git a/src/Image/index.tsx b/src/Image/index.tsx index 0ae0fe6..2c04624 100644 --- a/src/Image/index.tsx +++ b/src/Image/index.tsx @@ -69,6 +69,7 @@ export default class Image extends React.Component { priority quality={100} {...this.props.imageProps} + layout={this.state.image ? 'fill' : this.props.imageProps.layout} objectFit="contain" />