-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathTaskPath.tsx
More file actions
34 lines (30 loc) · 836 Bytes
/
TaskPath.tsx
File metadata and controls
34 lines (30 loc) · 836 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { InlineCode, InlineCodeVariant } from "~/components/code/InlineCode";
import { SpanCodePathAccessory } from "./SpanTitle";
import { cn } from "~/utils/cn";
type TaskPathProps = {
filePath: string;
functionName: string;
className?: string;
};
export function TaskPath({ filePath, functionName, className }: TaskPathProps) {
return (
<SpanCodePathAccessory
accessory={{
items: [{ text: filePath }, { text: functionName }],
}}
className={className}
/>
);
}
type TaskFileNameProps = {
fileName: string;
variant?: InlineCodeVariant;
className?: string;
};
export function TaskFileName({ variant, fileName, className }: TaskFileNameProps) {
return (
<InlineCode variant={variant} className={cn("text-text-dimmed", className)}>
{`${fileName}`}
</InlineCode>
);
}