Skip to content

Commit bbc9d6a

Browse files
committed
only video owners will be able to perform additional actions on caps
1 parent 1cdd7ae commit bbc9d6a

File tree

8 files changed

+1162
-1255
lines changed

8 files changed

+1162
-1255
lines changed

apps/web/app/(org)/dashboard/caps/components/CapCard/CapCard.tsx

Lines changed: 536 additions & 483 deletions
Large diffs are not rendered by default.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import { Button } from "@cap/ui";
2+
import { Tooltip } from "@/components/Tooltip";
3+
import { type ReactNode } from "react";
4+
import clsx from "clsx";
5+
6+
interface CapCardButtonProps {
7+
tooltipContent: string;
8+
onClick?: (e: React.MouseEvent) => void;
9+
disabled?: boolean;
10+
className: string;
11+
icon: () => ReactNode;
12+
}
13+
14+
export const CapCardButton = ({
15+
tooltipContent,
16+
onClick = () => {},
17+
disabled,
18+
className,
19+
icon,
20+
}: CapCardButtonProps) => {
21+
return (
22+
<Tooltip key={tooltipContent} content={tooltipContent}>
23+
<Button
24+
onClick={(e) => onClick?.(e)}
25+
disabled={disabled}
26+
className={clsx(
27+
`!size-8 hover:bg-gray-5 hover:border-gray-7 rounded-full min-w-fit !p-0`,
28+
className
29+
)}
30+
variant="white"
31+
size="sm"
32+
aria-label={tooltipContent}
33+
>
34+
{icon()}
35+
</Button>
36+
</Tooltip>
37+
);
38+
};

apps/web/app/(org)/dashboard/caps/components/CapCard/CapCardButtons.tsx

Lines changed: 0 additions & 173 deletions
This file was deleted.

0 commit comments

Comments
 (0)