|
1 | 1 | import { ProcessMessage } from "@/components/content/process-message"; |
2 | 2 | import { TimestampHoverCard } from "@/components/content/timestamp-hover-card"; |
3 | 3 | import { formatDate, formatDateRange, formatDateTime } from "@/lib/formatter"; |
| 4 | +import { |
| 5 | + StatusEventTimelineDot, |
| 6 | + StatusEventTimelineMessage, |
| 7 | + StatusEventTimelineSeparator, |
| 8 | + StatusEventTimelineTitle, |
| 9 | +} from "@openstatus/ui/components/blocks/status-events"; |
4 | 10 | import { Badge } from "@openstatus/ui/components/ui/badge"; |
5 | | -import { Separator } from "@openstatus/ui/components/ui/separator"; |
6 | 11 | import { |
7 | 12 | Tooltip, |
8 | 13 | TooltipContent, |
@@ -357,77 +362,3 @@ export function StatusEventTimelineMaintenance({ |
357 | 362 | </div> |
358 | 363 | ); |
359 | 364 | } |
360 | | - |
361 | | -export function StatusEventTimelineTitle({ |
362 | | - className, |
363 | | - children, |
364 | | - ...props |
365 | | -}: React.ComponentProps<"div">) { |
366 | | - return ( |
367 | | - <div |
368 | | - className={cn("font-medium text-foreground text-sm", className)} |
369 | | - {...props} |
370 | | - > |
371 | | - {children} |
372 | | - </div> |
373 | | - ); |
374 | | -} |
375 | | - |
376 | | -export function StatusEventTimelineMessage({ |
377 | | - className, |
378 | | - children, |
379 | | - ...props |
380 | | -}: React.ComponentProps<"div">) { |
381 | | - return ( |
382 | | - <div |
383 | | - className={cn( |
384 | | - "py-1.5 font-mono text-muted-foreground text-sm", |
385 | | - className, |
386 | | - )} |
387 | | - {...props} |
388 | | - > |
389 | | - {children} |
390 | | - </div> |
391 | | - ); |
392 | | -} |
393 | | - |
394 | | -export function StatusEventTimelineDot({ |
395 | | - className, |
396 | | - ...props |
397 | | -}: React.ComponentProps<"div">) { |
398 | | - return ( |
399 | | - <div |
400 | | - className={cn( |
401 | | - "size-2.5 shrink-0 rounded-full bg-muted", |
402 | | - "group-data-[variant=resolved]:bg-success", |
403 | | - "group-data-[variant=monitoring]:bg-info", |
404 | | - "group-data-[variant=identified]:bg-warning", |
405 | | - "group-data-[variant=investigating]:bg-destructive", |
406 | | - "group-data-[variant=maintenance]:bg-info", |
407 | | - className, |
408 | | - )} |
409 | | - {...props} |
410 | | - /> |
411 | | - ); |
412 | | -} |
413 | | - |
414 | | -export function StatusEventTimelineSeparator({ |
415 | | - className, |
416 | | - ...props |
417 | | -}: React.ComponentProps<typeof Separator>) { |
418 | | - return ( |
419 | | - <Separator |
420 | | - orientation="vertical" |
421 | | - className={cn( |
422 | | - "mx-auto flex-1", |
423 | | - "group-data-[variant=resolved]:bg-success", |
424 | | - "group-data-[variant=monitoring]:bg-info", |
425 | | - "group-data-[variant=identified]:bg-warning", |
426 | | - "group-data-[variant=investigating]:bg-destructive", |
427 | | - "group-data-[variant=maintenance]:bg-info", |
428 | | - className, |
429 | | - )} |
430 | | - {...props} |
431 | | - /> |
432 | | - ); |
433 | | -} |
0 commit comments