mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-04-19 22:19:49 -04:00
34 lines
613 B
TypeScript
34 lines
613 B
TypeScript
import folderWhiteSvg from '@sd/assets/svgs/folder-white.svg';
|
|
import folderSvg from '@sd/assets/svgs/folder.svg';
|
|
|
|
interface FolderProps {
|
|
/**
|
|
* Append additional classes to the underlying SVG
|
|
*/
|
|
className?: string;
|
|
|
|
/**
|
|
* Render a white folder icon
|
|
*/
|
|
white?: boolean;
|
|
|
|
/**
|
|
* The size of the icon to show -- uniform width and height
|
|
*/
|
|
size?: number;
|
|
}
|
|
|
|
export function Folder(props: FolderProps) {
|
|
const { size = 24 } = props;
|
|
|
|
return (
|
|
<img
|
|
className={props.className}
|
|
width={size}
|
|
height={size}
|
|
src={props.white ? folderWhiteSvg : folderSvg}
|
|
alt="Folder icon"
|
|
/>
|
|
);
|
|
}
|