airline-ccai-fulfillment-tools-test
Version:
A collection of tools to assist in the creation of Airline CCAI cards via fulfillment scripts
19 lines (16 loc) • 342 B
text/typescript
import { TNotification, TEMPLATES } from '../types';
interface INotificationInput {
title?: string;
type: 'success' | 'error';
text: string;
}
export const createNotification = ({
title,
type,
text,
}: INotificationInput): TNotification => ({
template: TEMPLATES.NOTIFICATION,
title,
type,
text,
});