Add dark mode

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Jonathan
2025-05-23 22:52:05 +02:00
committed by Sacha Al Himdani
parent faf1ce0eb9
commit f9d1f033e0
14 changed files with 144 additions and 80 deletions

View File

@@ -58,13 +58,23 @@ export function Tbody({ children }: PropsWithChildren) {
export function Td({
children,
noLink,
}: PropsWithChildren<{ noLink?: boolean }>) {
className,
}: PropsWithChildren<{ noLink?: boolean; className?: string }>) {
const { to } = useContext(TrContext);
if (!to || noLink) {
return <td className="first:pl-6 last:pr-6 py-3">{children}</td>;
return (
<td className={clsx("first:pl-6 last:pr-6 py-3", className)}>
{children}
</td>
);
}
return (
<td className="first:*:pl-6 *:block last:*:pr-6 py-3">
<td
className={clsx(
"first:*:pl-6 *:block last:*:pr-6 *:py-3",
className,
)}
>
<Link to={to}>{children}</Link>
</td>
);