mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-21 22:59:07 +00:00
add header group
This commit is contained in:
parent
30db4e58ff
commit
09955a5ba9
@ -9,18 +9,24 @@ const HeaderAlertGroup: (props: ComponentProps) => ReactElement = (
|
||||
): ReactElement => {
|
||||
return (
|
||||
<div className="rounded-lg m-2 flex border-2 border-gray-200">
|
||||
{props.children.map((child: ReactElement, index: number) => {
|
||||
const isLastElement: boolean = index === props.children.length - 1;
|
||||
{props.children &&
|
||||
props.children
|
||||
.filter((child: ReactElement) => {
|
||||
// does this child has children?;
|
||||
return true;
|
||||
})
|
||||
.map((child: ReactElement, index: number) => {
|
||||
const isLastElement: boolean = index === props.children.length - 1;
|
||||
|
||||
return (
|
||||
<div key={index} className="p-4 flex">
|
||||
{child}
|
||||
{!isLastElement && (
|
||||
<div className="border-r-2 border-gray-200"></div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
return (
|
||||
<div key={index} className="p-4 flex">
|
||||
{child}
|
||||
{!isLastElement && (
|
||||
<div className="border-r-2 border-gray-200"></div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
@ -276,6 +276,9 @@ const DashboardHeader: FunctionComponent<ComponentProps> = (
|
||||
icon={IconProp.Clock}
|
||||
tooltip="Your trial ends soon"
|
||||
alertType={HeaderAlertType.INFO}
|
||||
onClick={() => {
|
||||
Navigation.navigate(RouteMap[PageMap.SETTINGS_BILLING]!);
|
||||
}}
|
||||
title={`${OneUptimeDate.getNumberOfDaysBetweenDatesInclusive(
|
||||
OneUptimeDate.getCurrentDate(),
|
||||
props.selectedProject!.trialEndsAt!,
|
||||
|
Loading…
Reference in New Issue
Block a user