mirror of https://github.com/usememos/memos
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
375 B
TypeScript
20 lines
375 B
TypeScript
import Icon from "./Icon";
|
|
|
|
interface Props {
|
|
className: string;
|
|
resourceType: string;
|
|
}
|
|
|
|
const ResourceIcon = (props: Props) => {
|
|
const { className, resourceType } = props;
|
|
|
|
let ResourceIcon = Icon.FileText;
|
|
if (resourceType.includes("image")) {
|
|
ResourceIcon = Icon.Image;
|
|
}
|
|
|
|
return <ResourceIcon className={className} />;
|
|
};
|
|
|
|
export default ResourceIcon;
|