feat: drill-down en pestaña nueva, rol Vendedor y scripts demo
This commit is contained in:
@@ -11,6 +11,8 @@ interface KpiCardProps {
|
||||
icon?: React.ReactNode;
|
||||
className?: string;
|
||||
href?: string;
|
||||
target?: string;
|
||||
rel?: string;
|
||||
}
|
||||
|
||||
export function KpiCard({
|
||||
@@ -22,6 +24,8 @@ export function KpiCard({
|
||||
icon,
|
||||
className,
|
||||
href,
|
||||
target,
|
||||
rel,
|
||||
}: KpiCardProps) {
|
||||
const formatValue = (val: string | number) => {
|
||||
if (typeof val === 'number') {
|
||||
@@ -36,7 +40,7 @@ export function KpiCard({
|
||||
};
|
||||
|
||||
const Wrapper = href ? 'a' : 'div';
|
||||
const wrapperProps = href ? { href, className: 'block' } : {};
|
||||
const wrapperProps = href ? { href, target, rel, className: 'block' } : {};
|
||||
|
||||
return (
|
||||
<Card className={cn(href && 'hover:border-primary/50 hover:shadow-md transition-all cursor-pointer', className)}>
|
||||
|
||||
Reference in New Issue
Block a user