Files
o2o-clinicad-frontend/src/features/report/ui/overview/OverviewMetaChips.tsx
T

32 lines
1.3 KiB
TypeScript

import CalendarIcon from "@/assets/report/calendar.svg?react";
import GlobeIcon from "@/assets/report/globe.svg?react";
import MapPinIcon from "@/assets/report/map-pin.svg?react";
import { OVERVIEW_META_CHIP_CLASS } from "@/features/report/ui/overview/overviewSectionClasses";
export type OverviewMetaChipsProps = {
date: string;
targetUrl: string;
location: string;
};
export function OverviewMetaChips({ date, targetUrl, location }: OverviewMetaChipsProps) {
return (
<div className="flex flex-wrap gap-3 justify-center md:justify-start animate-fade-in-up animation-delay-300">
<span className={OVERVIEW_META_CHIP_CLASS}>
<CalendarIcon className="text-neutral-60 shrink-0" width={16} height={16} aria-hidden />
<span className="break-keep">{date}</span>
</span>
<span className={OVERVIEW_META_CHIP_CLASS}>
<GlobeIcon className="text-neutral-60 shrink-0" width={16} height={16} aria-hidden />
<span className="truncate max-w-[min(100%,280px)]" title={targetUrl}>
{targetUrl}
</span>
</span>
<span className={OVERVIEW_META_CHIP_CLASS}>
<MapPinIcon className="text-neutral-60 shrink-0" width={16} height={16} aria-hidden />
<span className="break-keep text-left">{location}</span>
</span>
</div>
);
}