import type { ComponentStory } from '@storybook/react'; import CentreonLogoLight from '../@assets/brand/centreon-logo-one-line-light.svg'; import NotAuthorized from '../@assets/images/not-authorized-template-background-light.svg'; import LoadingSkeleton from '../LoadingSkeleton'; import Image, { ImageVariant } from './Image'; export default { argTypes: { alt: { control: 'text' }, height: { control: 'number' }, width: { control: 'number' } }, component: Image, title: 'Image' }; const Template: ComponentStory = (args) => ( } imagePath={CentreonLogoLight} /> ); const size = 50; export const basic = Template.bind({}); basic.args = { alt: 'Centreon logo light' }; export const multipleImages = (): JSX.Element => { return (
Centreon logo light} height={size} imagePath={CentreonLogoLight} width={size} /> Not authorized} height={size} imagePath={NotAuthorized} width={size} /> Centreon logo light} height={size} imagePath={CentreonLogoLight} width={size} /> Not authorized} height={size} imagePath={NotAuthorized} width={size} />
); }; export const withWidthAndHeight = Template.bind({}); withWidthAndHeight.args = { alt: 'Centreon logo light', fallback: , height: size, imagePath: CentreonLogoLight, width: size }; export const imageNotFound = (): JSX.Element => ( Not found alt text} height={size} imagePath="not-found" width={size} /> ); export const variantContain = Template.bind({}); variantContain.args = { alt: 'Centreon logo light', height: size, variant: ImageVariant.Contain, width: size };