airline-ccai-fulfillment-tools-test
Version:
A collection of tools to assist in the creation of Airline CCAI cards via fulfillment scripts
22 lines (19 loc) • 396 B
text/typescript
import { TTimeline, TEMPLATES, SIZES } from '../types';
interface ITimelineInput {
items: Array<{
title: string;
subtitle: string;
}>;
width?: SIZES;
title?: string;
}
export const createTimeline = ({
items,
width,
title,
}: ITimelineInput): TTimeline => ({
template: TEMPLATES.TIMELINE,
items,
width: width ?? SIZES.FULL,
title,
});