Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaced text for changing views with icons #501

Merged
merged 6 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added src/assets/images/arc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/cells.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/data-flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions src/examples/Button/ThreeWayToggle/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import ToggleButton from '@mui/material/ToggleButton';
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
import ModelTable from '../../../pages/ModelOfInterest/ModelDisplay/ModelTable';
import SearchVoiList from '../../../pages/VulnerabilityOfInterest/VoiTable/SearchVoiList';
import graphIcon from "../../../assets/images/data-flow.png"
import tableIcon from "../../../assets/images/cells.png"
import arcIcon from "../../../assets/images/arc.png"

function switchView(viewValue:any, filteredCveReport: any, filterName: any, handleFilterByName: any) {
switch (viewValue) {
Expand Down Expand Up @@ -46,9 +49,9 @@ export default function ThreeWayToggleButton({filteredCveReport, filterName, han
aria-label="Platform"
style={{ float: 'right', paddingTop: "2%", paddingRight: "1%"}}
>
<ToggleButton style={{ color: "black", fontWeight: "bold" }} value="table">Table</ToggleButton>
<ToggleButton style={{ color: "black", fontWeight: "bold" }} value="graph">Graph</ToggleButton>
<ToggleButton style={{ color: "black", fontWeight: "bold" }} value="arc">Arc</ToggleButton>
<ToggleButton style={{ color: "black", fontWeight: "bold" }} value="table" title='Table view of models'><img style={{ display: "block", width: "17px" }} src={tableIcon} /></ToggleButton>
<ToggleButton style={{ color: "black", fontWeight: "bold" }} value="graph" title='Force directed graph that show the models and its dependencies'><img style={{ display: "block", width: "17px" }} src={graphIcon} /></ToggleButton>
<ToggleButton style={{ color: "black", fontWeight: "bold" }} value="arc" title='Arc graph that shows the dependencies between models, vulnerabilities and projects'><img style={{ display: "block", width: "17px" }} src={arcIcon} /></ToggleButton>
</ToggleButtonGroup>
{switchView(view, filteredCveReport, filterName, handleFilterByName)}
</>
Expand Down
Loading