added tons of files, got the bin page to render
This commit is contained in:
parent
a027b8a96f
commit
9bbbf0940e
34 changed files with 10492 additions and 19 deletions
28
src/products/CommonIcons/co2Icon.tsx
Normal file
28
src/products/CommonIcons/co2Icon.tsx
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import Co2DarkIcon from "assets/components/co2Dark.png";
|
||||
import Co2LightIcon from "assets/components/co2Light.png";
|
||||
import { ImgIcon } from "common/ImgIcon";
|
||||
import { useThemeType } from "hooks";
|
||||
|
||||
interface Props {
|
||||
type?: "light" | "dark";
|
||||
size?: number;
|
||||
}
|
||||
|
||||
export default function Co2Icon(props: Props) {
|
||||
const themeType = useThemeType();
|
||||
const { type, size } = props;
|
||||
|
||||
const src = () => {
|
||||
if (type) {
|
||||
return type === "light" ? Co2LightIcon : Co2DarkIcon;
|
||||
}
|
||||
|
||||
return themeType === "light" ? Co2DarkIcon : Co2LightIcon;
|
||||
};
|
||||
|
||||
if (size) {
|
||||
return <img width={size} height={size} alt="co2" src={src()} />;
|
||||
}
|
||||
|
||||
return <ImgIcon alt="co2" src={src()} />;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue