@@ -3,7 +3,7 @@ import { getResourceColorData, RAINBOW_CONIC_GRADIENT } from "@/ui/colors";
33import { Bolt } from "@dub/ui" ;
44import { cn , OG_AVATAR_URL } from "@dub/utils" ;
55import { ReactNode } from "react" ;
6- import { ActorType , getActorType } from "./activity-log-registry" ;
6+ import { getActorType } from "./activity-log-registry" ;
77
88interface GroupPillProps extends Pick < GroupProps , "name" | "color" > { }
99
@@ -16,13 +16,17 @@ interface UserChipProps {
1616 user : NonNullable < ActivityLog [ "user" ] > ;
1717}
1818
19+ interface ActorChipProps {
20+ log : ActivityLog ;
21+ }
22+
1923export function GroupPill ( { name, color } : GroupPillProps ) {
2024 const colorClassName = color
2125 ? getResourceColorData ( color ) ?. groupVariants
2226 : undefined ;
2327
2428 return (
25- < span className = "inline-flex items-center gap-1.5 rounded-md bg-neutral-100 px-2 py-0.5 text-sm font-medium text-neutral-700" >
29+ < span className = "inline-flex items-center gap-1 rounded-lg bg-neutral-100 px-2 py-0.5 text-sm font-medium text-neutral-700" >
2630 < span
2731 className = { cn ( "size-2.5 shrink-0 rounded-full" , colorClassName ) }
2832 { ...( ! colorClassName && {
@@ -38,20 +42,16 @@ export function GroupPill({ name, color }: GroupPillProps) {
3842
3943export function SourcePill ( { icon, label } : SourcePillProps ) {
4044 return (
41- < span className = "inline-flex items-center gap-1.5 rounded-md bg-neutral-100 px-2 py-0.5 text-sm font-medium text-neutral-700" >
42- { icon && (
43- < span className = "flex size-3.5 items-center justify-center text-neutral-500" >
44- { icon }
45- </ span >
46- ) }
45+ < span className = "inline-flex items-center gap-1 rounded-lg bg-neutral-100 px-2 py-0.5 text-sm font-medium text-neutral-700" >
46+ { icon && < span className = "size-2.5 shrink-0 rounded-full" > { icon } </ span > }
4747 { label }
4848 </ span >
4949 ) ;
5050}
5151
5252export function UserChip ( { user } : UserChipProps ) {
5353 return (
54- < span className = "inline-flex items-center gap-1.5 rounded-md bg-neutral-100 px-2 py-0.5 text-sm font-medium text-neutral-700" >
54+ < span className = "inline-flex items-center gap-1 rounded-lg bg-neutral-100 px-2 py-0.5 text-sm font-medium text-neutral-700" >
5555 < img
5656 src = { user . image || `${ OG_AVATAR_URL } ${ user . id } ` }
5757 alt = { `${ user . name || user . email || "User" } ` }
@@ -64,17 +64,13 @@ export function UserChip({ user }: UserChipProps) {
6464
6565export function SystemChip ( ) {
6666 return (
67- < span className = "inline-flex items-center gap-1.5 rounded-md bg-neutral-100 px-2 py-0.5 text-sm font-medium text-neutral-700" >
67+ < span className = "inline-flex items-center gap-1 rounded-lg bg-neutral-100 px-2 py-0.5 text-sm font-medium text-neutral-700" >
6868 < Bolt className = "size-3 text-neutral-500" />
6969 System
7070 </ span >
7171 ) ;
7272}
7373
74- interface ActorChipProps {
75- log : ActivityLog ;
76- }
77-
7874export function ActorChip ( { log } : ActorChipProps ) {
7975 const actorType = getActorType ( log ) ;
8076
@@ -84,7 +80,3 @@ export function ActorChip({ log }: ActorChipProps) {
8480
8581 return < SystemChip /> ;
8682}
87-
88- export function getActorPreposition ( actorType : ActorType ) : string {
89- return "by" ;
90- }
0 commit comments