image: some()

in apps-rendering/src/components/editions/byline/byline.stories.tsx [43:142]


		image: some(image),
		apiUrl: '',
	},
];

const parser = new DOMParser();
const parseByline = parse(parser);

const profileLink = 'https://theguardian.com';
const byline = 'Jane Smith';
const job = 'Editor of things';

const mockBylineHtml = parseByline(
	`<a href="${profileLink}">${byline}</a> ${job}`,
).toOption();

// ----- Stories ----- //

const Default = (): ReactElement => (
	<Byline
		item={{
			...article,
			display: ArticleDisplay.Standard,
			bylineHtml: mockBylineHtml,
			theme: Pillar.News,
		}}
	/>
);

const Analysis = (): ReactElement => (
	<Byline
		item={{
			...analysis,
			bylineHtml: mockBylineHtml,
			theme: Pillar.News,
		}}
	/>
);

const Feature = (): ReactElement => (
	<Byline
		item={{
			...feature,
			bylineHtml: mockBylineHtml,
			theme: Pillar.News,
		}}
	/>
);

const Review = (): ReactElement => (
	<Byline
		item={{
			...review,
			bylineHtml: mockBylineHtml,
			theme: Pillar.News,
		}}
	/>
);

const Showcase = (): ReactElement => (
	<Byline
		item={{
			...article,
			display: ArticleDisplay.Showcase,
			bylineHtml: mockBylineHtml,
			theme: Pillar.News,
		}}
	/>
);

const Interview = (): ReactElement => (
	<Byline
		item={{
			...interview,
			bylineHtml: mockBylineHtml,
			theme: Pillar.News,
		}}
	/>
);

const Comment = (): ReactElement => (
	<div
		style={{
			marginTop: '64px',
		}}
	>
		<Byline
			item={{
				...comment,
				bylineHtml: mockBylineHtml,
				theme: Pillar.News,
				contributors: contributors,
			}}
		/>
	</div>
);

// ----- Exports ----- //

export default {