Files
spacedrive/interface/app/$libraryId/Layout/Sidebar/SidebarLayout/Section.tsx
Jamie Pine fdf31fc3a8 [ENG-1511] Library Screens (#1903)
* init

* changes

* Now updating statistics once a minute

* More robust statistics updater

* Concurrency is hard

* improvements to stats

* refactor

* adjust setting back/forward padding so it matches top bar

* refactor sidebar

* rename

* setting up screens

* some changes

* Co-authored-by: Brendan Allan <Brendonovich@users.noreply.github.com>

* yes

* yes2

* refactored explorerItem.ts

* important explorer code shouldn't be thrown away in a util moment

* support for multiple thumbnails in ExplorerItem

* clippy

* move debug

* yes

* label filters

* ts

* comment out unconnected stuff

* added .mid for midi files

---------

Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com>
Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2024-01-16 12:15:03 +00:00

23 lines
643 B
TypeScript

import type { PropsWithChildren } from 'react';
import { CategoryHeading } from '@sd/ui';
export default (
props: PropsWithChildren<{
name: string;
actionArea?: React.ReactNode;
onDoubleClick?: () => void;
}>
) => (
<div onDoubleClick={props.onDoubleClick} className="group">
<div className="mb-1 flex items-center justify-between">
<CategoryHeading className="ml-1">{props.name}</CategoryHeading>
{props.actionArea && (
<div className="text-sidebar-inkFaint opacity-0 transition-all duration-300 hover:!opacity-100 group-hover:opacity-30">
{props.actionArea}
</div>
)}
</div>
{props.children}
</div>
);