mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-04-21 15:07:54 -04:00
* beginnings of app directory * settings mostly good * colocate way more components * flatten components folder * reexport QueryClientProvider from client * move CodeBlock back to interface * colocate Explorer, KeyManager + more * goddamn captialisation * get toasts out of components * please eslint * no more src directory * $ instead of : * added back RowHeader component * fix settings modal padding * more spacing, less margin * fix sidebar locations button * fix tags sidebar link * clean up back button * added margin to explorer context menu to prevent contact with edge of viewport * don't export QueryClientProvider from @sd/client * basic guidelines * import interface correctly * remove old demo data * fix onboarding layout * fix onboarding navigation * fix key manager settings button --------- Co-authored-by: Jamie Pine <ijamespine@me.com>
33 lines
867 B
TypeScript
33 lines
867 B
TypeScript
interface Column {
|
|
column: string;
|
|
key: string;
|
|
width: number;
|
|
}
|
|
|
|
export const columns = [
|
|
{ column: 'Name', key: 'name', width: 280 },
|
|
{ column: 'Type', key: 'extension', width: 150 },
|
|
{ column: 'Size', key: 'size', width: 100 },
|
|
{ column: 'Date Created', key: 'date_created', width: 150 },
|
|
{ column: 'Content ID', key: 'cas_id', width: 150 }
|
|
] as const satisfies Readonly<Column[]>;
|
|
|
|
export const ROW_HEADER_HEIGHT = 40;
|
|
|
|
export const RowHeader = () => (
|
|
<div
|
|
style={{ height: ROW_HEADER_HEIGHT }}
|
|
className="sticky mr-2 flex w-full flex-row rounded-lg border-2 border-transparent"
|
|
>
|
|
{columns.map((col) => (
|
|
<div
|
|
key={col.column}
|
|
className="flex items-center px-4 py-2 pr-2"
|
|
style={{ width: col.width, marginTop: -ROW_HEADER_HEIGHT * 2 }}
|
|
>
|
|
<span className="text-xs font-medium ">{col.column}</span>
|
|
</div>
|
|
))}
|
|
</div>
|
|
);
|