feat: use native link

This commit is contained in:
TrèsAbhi committed 2024-07-12 19:23:15 -05:00
1 parent 03ce75c15d
commit 8eb76b1efd
7 files changed
+66 -40

No files matched your search

+8 -2
View File
@@ -4,7 +4,7 @@ import { Table } from '@radix-ui/themes';
import { RootProps } from '@radix-ui/themes/dist/cjs/components/table';
import { useEffect, useRef } from 'react';
export function StickyTableRoot(props: RootProps) {
export function StickyTableRoot({ style, ...props }: RootProps) {
const table = useRef<HTMLTableElement>(null);
useEffect(() => {
@@ -13,5 +13,11 @@ export function StickyTableRoot(props: RootProps) {
?.style.setProperty('overflow', 'auto');
}, []);
return <Table.Root {...props} ref={table} />;
return (
<Table.Root
{...props}
ref={table}
style={{ overflow: 'hidden', ...style }}
/>
);
}