Open History to see the last commit
1interface FieldLabelProps {
2 path: string
3 leaf?: string
4}
5export function FieldLabel(props: FieldLabelProps) {
6 if (props.leaf === undefined || props.leaf === props.path)
7 return <span class="font-mono">{props.path}</span>
8 return (
9 <>
10 <span class="font-mono text-muted-foreground">
11 {props.path.slice(0, -1 * props.leaf.length)}
12 </span>
13 <span class="font-mono font-bold">{props.leaf}</span>
14 </>
15 )
16}