52 lines
1.2 KiB
TypeScript
52 lines
1.2 KiB
TypeScript
import { ImageStyle, TextStyle, ViewStyle } from "react-native";
|
|
import { CtaData } from "../..";
|
|
import { GenericWidgetData } from "../Widget";
|
|
import { GenericActionPayload } from "../../../actions/GenericAction";
|
|
|
|
export interface TitleWidgetData extends GenericWidgetData {
|
|
title?: TextFieldData;
|
|
subtitle?: TextFieldData;
|
|
rightTitle?: TextFieldData;
|
|
cta?: CtaData;
|
|
}
|
|
|
|
export interface TextFieldData {
|
|
text: string;
|
|
textStyle?: TextStyle;
|
|
substringStyles?: SubstringStyle[];
|
|
textDrawableData?: TextDrawableData;
|
|
cta?: CtaData;
|
|
actions?: GenericActionPayload,
|
|
viewStyle?: ViewStyle
|
|
}
|
|
|
|
export interface SubstringStyle {
|
|
substring: string;
|
|
textStyle?: TextStyle;
|
|
}
|
|
|
|
export interface TextDrawableData {
|
|
left?: ImageFieldData;
|
|
right?: ImageFieldData;
|
|
top?: ImageFieldData;
|
|
bottom?: ImageFieldData;
|
|
leftLottie?: LottieFieldData;
|
|
rightLottie?: LottieFieldData;
|
|
topLottie?: LottieFieldData;
|
|
bottomLottie?: LottieFieldData;
|
|
}
|
|
|
|
export interface ImageFieldData {
|
|
url: string;
|
|
imageStyle?: ImageStyle;
|
|
cta?: CtaData;
|
|
}
|
|
|
|
export interface LottieFieldData {
|
|
url: string;
|
|
loop?: boolean;
|
|
autoPlay?: boolean;
|
|
lottieStyle?: ImageStyle;
|
|
cta?: CtaData;
|
|
delayAnimationBy?: number;
|
|
} |