kmod-cli 1.2.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,36 +7,41 @@ import Link from 'next/link';
7
7
  import { cn } from '../lib/utils';
8
8
 
9
9
  type BreadcrumbItem = {
10
- label: ReactNode;
11
- as?: "link" | "a";
12
- href?: string;
13
- isCurrent?: boolean;
10
+ label: ReactNode;
11
+ as?: "link" | "a";
12
+ href?: string;
13
+ isCurrent?: boolean;
14
14
  };
15
15
 
16
16
  interface BreadcrumbProps {
17
- items: BreadcrumbItem[];
18
- className?: string;
17
+ items: BreadcrumbItem[];
18
+ classNames?: {
19
+ container?: string;
20
+ label?: string;
21
+ indicator?: string;
22
+ };
23
+ indicator?: ReactNode;
19
24
  }
20
25
 
21
- export const Breadcrumbs: React.FC<BreadcrumbProps> = ({ items, className }) => {
22
- return (
23
- <nav className={cn("text-muted-foreground flex items-center space-x-1 text-sm", className)} aria-label="Breadcrumb">
24
- {items.map((item, index) => (
25
- <React.Fragment key={index}>
26
- {index !== 0 && <ChevronRight className="text-muted-foreground h-4 w-4" />}
27
- {item.href && !item.isCurrent && item.as === "link" ? (
28
- <Link href={item.href} className="hover:text-foreground transition-colors">
29
- {item.label}
30
- </Link>
31
- ) : item.href && !item.isCurrent && item.as === "a" ? (
32
- <a href={item.href} className="hover:text-foreground transition-colors">
33
- {item.label}
34
- </a>
35
- ) : (
36
- <span className="text-foreground font-medium">{item.label}</span>
37
- )}
38
- </React.Fragment>
39
- ))}
40
- </nav>
41
- );
42
- };
26
+ export const Breadcrumbs: React.FC<BreadcrumbProps> = ({ items, indicator, classNames }) => {
27
+ return (
28
+ <nav className={cn("text-muted-foreground flex items-center space-x-1 text-sm", classNames?.container)} aria-label="Breadcrumb">
29
+ {items.map((item, index) => (
30
+ <React.Fragment key={index}>
31
+ {index !== 0 && indicator && <ChevronRight className={cn("text-muted-foreground h-4 w-4", classNames?.indicator)} />}
32
+ {item.href && !item.isCurrent && item.as === "link" ? (
33
+ <Link href={item.href} className={cn("hover:text-foreground transition-colors", classNames?.label)}>
34
+ {item.label}
35
+ </Link>
36
+ ) : item.href && !item.isCurrent && item.as === "a" ? (
37
+ <a href={item.href} className={cn("hover:text-foreground transition-colors", classNames?.label)}>
38
+ {item.label}
39
+ </a>
40
+ ) : (
41
+ <span className="text-foreground font-medium">{item.label}</span>
42
+ )}
43
+ </React.Fragment>
44
+ ))}
45
+ </nav>
46
+ );
47
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kmod-cli",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Stack components utilities fast setup in projects",
5
5
  "author": "kumo_d",
6
6
  "license": "MIT",