@hhgtech/hhg-components
Version:
Hello Health Group common components
224 lines (223 loc) • 5.79 kB
TypeScript
/// <reference types="react" />
export { LocaleType } from "../../interfaces/types";
import { UserInfo } from "../../interfaces/types";
export type LogoType = 'hellobacsi' | 'hellosehat' | 'hellohealth' | 'hellotogether' | 'hellocare' | 'logomark' | 'hellodoctor' | 'hellokrupet' | 'helloswasthya' | 'hellosayarwon' | 'helloyishi' | 'hellokhunmor' | 'hellodoktor' | 'marryBaby';
export type DesktopMenuPopup = 'categories' | 'tools' | 'care' | 'together' | 'profile' | 'language' | 'shop' | 'none' | 'video';
export type MobileMenuPopup = 'categories' | 'profile' | 'language' | 'none';
export type SearchType = 'doctor' | 'service' | 'hospital' | undefined;
export type Specialty = {
name: string;
id: number;
thumbnail: string;
total_doctor: number;
slug: string;
};
export type SpotlightSummaryApi = {
ID: number;
name: string;
permalink: string;
image?: string;
image_medium?: string;
image_thumbnail?: string;
start_date?: string | null;
end_date?: string | null;
small_banner?: string;
desktop_banner?: string | null;
mobile_banner?: string | null;
};
export type SpotlightSummary = {
id: number;
name: string;
permalink: string;
image: string;
imageMedium?: string | null;
imageThumbnail?: string | null;
startDate?: string | null;
endDate?: string | null;
};
export type Category = {
iconUrl: string;
categoryName: string;
name: string;
slugName: string;
imageColor: string;
displayName: string;
permalink: string;
customizedUrl?: string | null;
slug: string;
childCates: Category[];
};
export type HealthToolApi = {
title: string;
subtitle: string;
icon: string;
link: string;
is_mobile_app_tool?: boolean;
};
export type HealthTool = {
title: string;
subtitle: string;
icon: string;
link: string;
isMobileAppTool?: boolean;
};
export type HealthCareApi = {
id: string;
object_id: {
id: string;
name: string;
logo: string;
slug: string;
description: string;
link?: string;
};
};
export type HealthCare = {
thumbnail: string;
link: string;
subtitle: string;
name: string;
slug: string;
};
export type HealthSearchDoctorApi = {
id: string;
name: string;
slug: string;
logo: string;
about: string;
link?: string;
};
export type HealthSearchDoctor = {
description: string;
logo: string;
name: string;
slug: string;
id: string;
};
export type CategoryHealthToolApi = {
term_id: number;
name: string;
health_tools: HealthToolApi[];
};
export type HealthToolByCategory = {
termId: number;
name: string;
healthTools: HealthTool[];
};
export type MenuService = {
name: string;
id: string;
thumbnail: string;
link: string;
};
export type NotificationType = {
id: number;
message: string;
type: 'success' | 'danger' | 'warning' | 'info';
};
export type State = {
isLoggedIn: boolean;
isMobileSsr: boolean;
userInfo?: UserInfo;
openLogoutPopup: boolean;
newBookmark: number[];
focusCommentId?: string | number;
notifications: NotificationType[];
isOpenDueDatePopup?: boolean;
dueDateRedirectLink?: string | null;
dueDate?: string | null;
};
export type UrlSource = 'first_login' | 'welcome_back' | 'comment';
export type Action = {
type: string;
payload?: any;
};
export type PushNotificationPayloadType = {
message: string;
type: 'success' | 'danger' | 'info' | 'warning';
title?: string;
};
export type Context = {
state: State;
dispatch: (action: Action) => void;
pushNotifications: (payload: PushNotificationPayloadType) => void;
};
export type SiteType = 'marryBaby' | 'helloSites';
export type CategoriesLayout = 'short' | 'long';
export type FooterInfo = {
general: {
logo: string;
content: string;
copyright: string;
verified: Array<{
image: string;
url: string;
}>;
};
menu: Array<{
menu_title: string;
items: Array<{
title: string;
url: string;
}>;
}>;
social: {
title: string;
socials: Array<{
icon: string;
name: string;
url: string;
}>;
};
branch: {
title: string;
branch: Array<{
flag: string;
name: string;
url: string;
}>;
};
};
export type MarryBabyFooterInfo = {
title: string;
link: string;
}[];
export type Option = {
label: string | JSX.Element;
value: string | Date | number;
icon?: JSX.Element;
};
export type MenuServiceType = 'categories' | 'tools' | 'together' | 'care' | 'ecom' | 'video';
export type MenuItemType = {
name: string;
id: MenuServiceType;
link: string;
niceName?: string;
thumbnail: string;
popupType: DesktopMenuPopup;
isNew?: boolean;
};
export type LocalisedSlugsType = 'HOSPITAL' | 'SERVICE' | 'DOCTOR' | 'ALL' | 'SEARCH' | 'SPECIALTIES';
export type ContentSponsor = {
title?: string;
link?: string;
logo?: string | false;
image?: string | false;
};
export type AmpNextArticle = {
articleOne?: {
title: string;
image: string;
link: string;
};
articleTwo?: {
title: string;
image: string;
link: string;
};
articleThree?: {
title: string;
image: string;
link: string;
};
};