Move custom icons to a separate folder
This commit is contained in:
parent
eff3f57071
commit
9036a96a22
@ -1,38 +0,0 @@
|
|||||||
export function IconAddTable({ theme }) {
|
|
||||||
return (
|
|
||||||
<svg height="26" width="26">
|
|
||||||
<path
|
|
||||||
fill="none"
|
|
||||||
stroke={theme === "light" ? "rgb(51 65 85)" : "lightgrey"}
|
|
||||||
strokeWidth="2"
|
|
||||||
d="M4 2 L20 2 A4 4 0 0 1 22 4 L22 14 M14 22 L4 22 A4 4 0 0 1 1 18 L1 4 A4 4 0 0 1 5 2 M22 17 L22 25 M18 21 L26 21 M1 8 L22 8"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function IconAddArea({ theme }) {
|
|
||||||
return (
|
|
||||||
<svg height="26" width="26">
|
|
||||||
<path
|
|
||||||
fill="none"
|
|
||||||
stroke={theme === "light" ? "rgb(51 65 85)" : "lightgrey"}
|
|
||||||
strokeWidth="2"
|
|
||||||
d="M4 2 L20 2 A4 4 0 0 1 22 4 L22 14 M14 22 L4 22 A4 4 0 0 1 1 18 L1 4 A4 4 0 0 1 5 2 M22 17 L22 25 M18 21 L26 21"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function IconAddNote({ theme }) {
|
|
||||||
return (
|
|
||||||
<svg height="26" width="26">
|
|
||||||
<path
|
|
||||||
fill="none"
|
|
||||||
stroke={theme === "light" ? "rgb(51 65 85)" : "lightgrey"}
|
|
||||||
strokeWidth="2"
|
|
||||||
d="M12 2 L20 2 A4 4 0 0 1 22 4 L22 14 M14 22 L4 22 A4 4 0 0 1 1 18 L1 12 L12 2 M1 12 L9 12 A3 3 0 0 0 12 9 L12 1 M22 17 L22 25 M18 21 L26 21"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
);
|
|
||||||
}
|
|
@ -42,7 +42,6 @@ import {
|
|||||||
jsonToMariaDB,
|
jsonToMariaDB,
|
||||||
jsonToSQLServer,
|
jsonToSQLServer,
|
||||||
} from "../../utils/toSQL";
|
} from "../../utils/toSQL";
|
||||||
import { IconAddTable, IconAddArea, IconAddNote } from "../CustomIcons";
|
|
||||||
import {
|
import {
|
||||||
ObjectType,
|
ObjectType,
|
||||||
Action,
|
Action,
|
||||||
@ -59,7 +58,6 @@ import { db } from "../../data/db";
|
|||||||
import { useLiveQuery } from "dexie-react-hooks";
|
import { useLiveQuery } from "dexie-react-hooks";
|
||||||
import { Parser } from "node-sql-parser";
|
import { Parser } from "node-sql-parser";
|
||||||
import Todo from "./Todo";
|
import Todo from "./Todo";
|
||||||
|
|
||||||
import useLayout from "../../hooks/useLayout";
|
import useLayout from "../../hooks/useLayout";
|
||||||
import useSettings from "../../hooks/useSettings";
|
import useSettings from "../../hooks/useSettings";
|
||||||
import useTransform from "../../hooks/useTransform";
|
import useTransform from "../../hooks/useTransform";
|
||||||
@ -77,6 +75,7 @@ import useNotes from "../../hooks/useNotes";
|
|||||||
import useTypes from "../../hooks/useTypes";
|
import useTypes from "../../hooks/useTypes";
|
||||||
import useSaveState from "../../hooks/useSaveState";
|
import useSaveState from "../../hooks/useSaveState";
|
||||||
import Thumbnail from "../Thumbnail";
|
import Thumbnail from "../Thumbnail";
|
||||||
|
import { IconAddArea, IconAddNote, IconAddTable } from "../../icons";
|
||||||
|
|
||||||
export default function ControlPanel({
|
export default function ControlPanel({
|
||||||
diagramId,
|
diagramId,
|
||||||
@ -2184,7 +2183,7 @@ export default function ControlPanel({
|
|||||||
className="flex items-center py-1 px-2 hover-2 rounded"
|
className="flex items-center py-1 px-2 hover-2 rounded"
|
||||||
onClick={() => addTable()}
|
onClick={() => addTable()}
|
||||||
>
|
>
|
||||||
<IconAddTable theme={settings.mode} />
|
<IconAddTable />
|
||||||
</button>
|
</button>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip content="Add subject area" position="bottom">
|
<Tooltip content="Add subject area" position="bottom">
|
||||||
@ -2192,7 +2191,7 @@ export default function ControlPanel({
|
|||||||
className="py-1 px-2 hover-2 rounded flex items-center"
|
className="py-1 px-2 hover-2 rounded flex items-center"
|
||||||
onClick={() => addArea()}
|
onClick={() => addArea()}
|
||||||
>
|
>
|
||||||
<IconAddArea theme={settings.mode} />
|
<IconAddArea />
|
||||||
</button>
|
</button>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip content="Add note" position="bottom">
|
<Tooltip content="Add note" position="bottom">
|
||||||
@ -2200,7 +2199,7 @@ export default function ControlPanel({
|
|||||||
className="py-1 px-2 hover-2 rounded flex items-center"
|
className="py-1 px-2 hover-2 rounded flex items-center"
|
||||||
onClick={() => addNote()}
|
onClick={() => addNote()}
|
||||||
>
|
>
|
||||||
<IconAddNote theme={settings.mode} />
|
<IconAddNote />
|
||||||
</button>
|
</button>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Divider layout="vertical" margin="8px" />
|
<Divider layout="vertical" margin="8px" />
|
||||||
|
12
src/icons/IconAddArea.jsx
Normal file
12
src/icons/IconAddArea.jsx
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
export default function IconAddArea() {
|
||||||
|
return (
|
||||||
|
<svg height="26" width="26">
|
||||||
|
<path
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
strokeWidth="2"
|
||||||
|
d="M4 2 L20 2 A4 4 0 0 1 22 4 L22 14 M14 22 L4 22 A4 4 0 0 1 1 18 L1 4 A4 4 0 0 1 5 2 M22 17 L22 25 M18 21 L26 21"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
);
|
||||||
|
}
|
12
src/icons/IconAddNote.jsx
Normal file
12
src/icons/IconAddNote.jsx
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
export default function IconAddNote() {
|
||||||
|
return (
|
||||||
|
<svg height="26" width="26">
|
||||||
|
<path
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
strokeWidth="2"
|
||||||
|
d="M12 2 L20 2 A4 4 0 0 1 22 4 L22 14 M14 22 L4 22 A4 4 0 0 1 1 18 L1 12 L12 2 M1 12 L9 12 A3 3 0 0 0 12 9 L12 1 M22 17 L22 25 M18 21 L26 21"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
);
|
||||||
|
}
|
12
src/icons/IconAddTable.jsx
Normal file
12
src/icons/IconAddTable.jsx
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
export default function IconAddTable() {
|
||||||
|
return (
|
||||||
|
<svg height="26" width="26">
|
||||||
|
<path
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
strokeWidth="2"
|
||||||
|
d="M4 2 L20 2 A4 4 0 0 1 22 4 L22 14 M14 22 L4 22 A4 4 0 0 1 1 18 L1 4 A4 4 0 0 1 5 2 M22 17 L22 25 M18 21 L26 21 M1 8 L22 8"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
);
|
||||||
|
}
|
3
src/icons/index.js
Normal file
3
src/icons/index.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export { default as IconAddTable } from "./IconAddTable";
|
||||||
|
export { default as IconAddArea } from "./IconAddArea";
|
||||||
|
export { default as IconAddNote } from "./IconAddNote";
|
Loading…
Reference in New Issue
Block a user