Files
spacedrive/interface/components/Folder.tsx
Oscar Beaumont 3622dba669 [ENG-974] DB Backup prototype (#1216)
* DB Backup prototype

* Put backups behind feature flag

* Warning for data folder

* nit

* Clippy

---------

Co-authored-by: Utku <74243531+utkubakir@users.noreply.github.com>
Co-authored-by: Vítor Vasconcellos <vasconcellos.dev@gmail.com>
2023-08-17 05:37:10 +00:00

46 lines
834 B
TypeScript

import {
Database as Database_Dark,
Database_Light,
Folder as Folder_Dark,
Folder_Light
} from '@sd/assets/icons';
import { useIsDark } from '~/hooks';
interface Props {
/**
* Append additional classes to the underlying SVG
*/
className?: string;
/**
* The size of the icon to show -- uniform width and height
*/
size?: number;
}
export function Folder({ size = 24, className }: Props) {
const isDark = useIsDark();
return (
<img
className={className}
width={size}
height={size}
src={isDark ? Folder_Light : Folder_Dark}
alt="Folder icon"
/>
);
}
export function Database({ size = 24, className }: Props) {
const isDark = useIsDark();
return (
<img
className={className}
width={size}
height={size}
src={isDark ? Database_Light : Database_Dark}
alt="Folder icon"
/>
);
}