adding side navigator and device icon

This commit is contained in:
Carter 2024-11-13 13:57:02 -06:00
parent a07dd30497
commit d49bbd9447
7 changed files with 263 additions and 57 deletions

View file

@ -0,0 +1,29 @@
import BindaptDarkIcon from "../../assets/products/bindapt/bindaptPlusDark.png";
import BindaptLightIcon from "../../assets/products/bindapt/bindaptPlusLight.png";
import { ImgIcon } from "../../common/ImgIcon";
import React from "react";
import { useThemeType } from "../../hooks/useThemeType";
interface Props {
type?: "light" | "dark";
size?: number;
}
export default function BindaptIcon(props: Props) {
const themeType = useThemeType();
const { type, size } = props;
const src = () => {
if (type) {
return type === "light" ? BindaptLightIcon : BindaptDarkIcon;
}
return themeType === "light" ? BindaptDarkIcon : BindaptLightIcon;
};
if (size) {
return <img width={size} height={size} alt="bins" src={src()} />;
}
return <ImgIcon alt="bins" src={src()} />;
}