-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- button are smaller on small screens - various layout debug - panel description hidden in a tooltip on small screen relates #127
- Loading branch information
1 parent
f1912b3
commit 4d5ed1f
Showing
10 changed files
with
114 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { FC, PropsWithChildren } from "react"; | ||
import { IoInformationCircleOutline } from "react-icons/io5"; | ||
|
||
import Tooltip from "./Tooltip"; | ||
|
||
export const InformationTooltip: FC<PropsWithChildren> = ({ children }) => { | ||
return ( | ||
<Tooltip | ||
closeOnClickContent | ||
attachment="top middle" | ||
targetAttachment="bottom middle" | ||
targetClassName="d-block d-md-none align-self-start" | ||
> | ||
<IoInformationCircleOutline className="align-top cursor-pointer" /> | ||
<div className=" dropdown-menu show over-modal position-relative p-2" style={{ width: "75vw" }}> | ||
{children} | ||
</div> | ||
</Tooltip> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,59 @@ | ||
import { FC } from "react"; | ||
import { FC, useMemo, useState } from "react"; | ||
import { useTranslation } from "react-i18next"; | ||
|
||
import { GraphAppearance } from "../../components/GraphAppearance"; | ||
import { AppearanceIcon } from "../../components/common-icons"; | ||
import { GraphGraphAppearance, GraphItemAppearance } from "../../components/GraphAppearance"; | ||
import { ToggleBar } from "../../components/Toggle"; | ||
import { AppearanceIcon, EdgeIcon, GraphIcon, NodeIcon } from "../../components/common-icons"; | ||
|
||
export const AppearancePanel: FC = () => { | ||
const { t } = useTranslation(); | ||
const [selected, setSelected] = useState("nodes"); | ||
const tabs = useMemo(() => { | ||
return [ | ||
{ | ||
value: "nodes", | ||
label: ( | ||
<> | ||
<NodeIcon className="me-1" /> {t("graph.model.nodes")} | ||
</> | ||
), | ||
}, | ||
{ | ||
value: "edges", | ||
label: ( | ||
<> | ||
<EdgeIcon className="me-1" /> {t("graph.model.edges")} | ||
</> | ||
), | ||
}, | ||
{ | ||
value: "graph", | ||
label: ( | ||
<> | ||
<GraphIcon className="me-1" /> {t("graph.model.graph")} | ||
</> | ||
), | ||
}, | ||
]; | ||
}, [t]); | ||
return ( | ||
<> | ||
<div className="panel-block"> | ||
<div className="panel-block pb-0"> | ||
<h2 className="fs-4"> | ||
<AppearanceIcon className="me-1" /> {t("appearance.title")} | ||
<AppearanceIcon className="me-1" /> {t("appearance.title")}{" "} | ||
</h2> | ||
<ToggleBar | ||
className="mt-1 justify-content-center" | ||
value={selected} | ||
onChange={(e) => setSelected(e)} | ||
options={tabs} | ||
/> | ||
</div> | ||
<hr className="m-0" /> | ||
|
||
<GraphAppearance /> | ||
{selected === "nodes" && <GraphItemAppearance itemType="nodes" />} | ||
{selected === "edges" && <GraphItemAppearance itemType="edges" />} | ||
{selected === "graph" && <GraphGraphAppearance />} | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters