mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
26 lines
543 B
TypeScript
26 lines
543 B
TypeScript
import { Table } from '@radix-ui/themes';
|
|
import type { ColumnHeaderCellProps } from '@radix-ui/themes/src/components/table.js';
|
|
|
|
interface StickyColumnHeaderCellProps extends ColumnHeaderCellProps {
|
|
top?: number | string;
|
|
}
|
|
|
|
export function StickyColumnHeaderCell({
|
|
style,
|
|
top = 0,
|
|
...props
|
|
}: StickyColumnHeaderCellProps) {
|
|
return (
|
|
<Table.ColumnHeaderCell
|
|
style={{
|
|
position: 'sticky',
|
|
top,
|
|
background: 'var(--gray-3)',
|
|
zIndex: 1,
|
|
...style,
|
|
}}
|
|
{...props}
|
|
/>
|
|
);
|
|
}
|