Icon offline, svg in public und ein icon component erstellt
This commit is contained in:
17
components/icons/CogIcon.tsx
Normal file
17
components/icons/CogIcon.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import React from "react";
|
||||
|
||||
type Props = {
|
||||
className?: string;
|
||||
onClick?: () => void;
|
||||
};
|
||||
|
||||
export default function CogIcon({ className, onClick }: Props) {
|
||||
return (
|
||||
<img
|
||||
src="/icons/mdi--cog-outline.svg"
|
||||
alt="Einstellungen"
|
||||
className={className}
|
||||
onClick={onClick}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -3,6 +3,7 @@ import React from "react";
|
||||
import { Icon } from "@iconify/react";
|
||||
import { useSelector } from "react-redux";
|
||||
import { RootState } from "../../../redux/store";
|
||||
import CogIcon from "../../../components/icons/CogIcon";
|
||||
|
||||
type Props = {
|
||||
openInputModal: (input: any) => void;
|
||||
@@ -51,8 +52,7 @@ export default function DigitalInputs({ openInputModal, inputRange }: Props) {
|
||||
|
||||
<td className="px-1 py-1">{input.label}</td>
|
||||
<td className="px-1 py-1">
|
||||
<Icon
|
||||
icon="mdi:cog"
|
||||
<CogIcon
|
||||
className="text-gray-400 text-base cursor-pointer"
|
||||
onClick={() => openInputModal(input)}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user