UnlyEd/next-right-now

View on GitHub
src/stories/nrn/asset/AirtableAsset.stories.tsx

Summary

Maintainability
A
0 mins
Test Coverage
import AirtableAsset from '@/modules/core/airtable/components/AirtableAsset';
import { Asset } from '@/modules/core/data/types/Asset';
import { GetFCProps } from '@/modules/core/ts/types/GetFCProps';
import {
  Meta,
  Story,
} from '@storybook/react/types-6-0';
import React from 'react';

type Props = GetFCProps<typeof AirtableAsset>;

const defaultLogoUrl = 'https://dl.airtable.com/lA5gmGBQheUvmuX616wU_monochromelogo.png';

export default {
  title: 'Next Right Now/Asset/AirtableAsset',
  component: AirtableAsset,
  argTypes: {},
} as Meta;

export const DynamicAirtableLogo: Story<Props> = (props) => {
  return (
    <AirtableAsset
      {...props}
    />
  );
};
DynamicAirtableLogo.args = {
  id: 'default-logo',
  className: 'default-class',
  asset: {
    url: defaultLogoUrl,
    linkUrl: 'https://github.com/UnlyEd/next-right-now',
  } as Asset,
  transformationsOverride: {
    width: 300,
    height: 100,
  },
  style: {
    backgroundColor: 'white',
  },
  onClick: () => console.log('click on asset'),
};
DynamicAirtableLogo.parameters = {
  jest: ['AirtableAsset.test.tsx'],
};