adding side navigator and device icon
This commit is contained in:
parent
a07dd30497
commit
d49bbd9447
7 changed files with 263 additions and 57 deletions
29
src/products/Bindapt/BindaptIcon.tsx
Normal file
29
src/products/Bindapt/BindaptIcon.tsx
Normal 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()} />;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue