Skip to content

Commit

Permalink
Migrate SUIR components to MUI.
Browse files Browse the repository at this point in the history
  • Loading branch information
fniessink committed Dec 23, 2024
1 parent 76de9b2 commit a4cd919
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 55 deletions.
1 change: 0 additions & 1 deletion components/frontend/src/semantic_ui_react_wrappers.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export { Form } from "./semantic_ui_react_wrappers/Form"
export { Header } from "./semantic_ui_react_wrappers/Header"
export { Label } from "./semantic_ui_react_wrappers/Label"
export { Message } from "./semantic_ui_react_wrappers/Message"
export { Modal } from "./semantic_ui_react_wrappers/Modal"
export { Popup } from "./semantic_ui_react_wrappers/Popup"
export { Segment } from "./semantic_ui_react_wrappers/Segment"
export { Tab } from "./semantic_ui_react_wrappers/Tab"
Expand Down
15 changes: 0 additions & 15 deletions components/frontend/src/semantic_ui_react_wrappers/Modal.css

This file was deleted.

14 changes: 0 additions & 14 deletions components/frontend/src/semantic_ui_react_wrappers/Modal.js

This file was deleted.

32 changes: 8 additions & 24 deletions components/frontend/src/widgets/ItemBreadcrumb.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,20 @@
import NavigateNextIcon from "@mui/icons-material/NavigateNext"
import { Breadcrumbs } from "@mui/material"
import { string } from "prop-types"

import { Breadcrumb } from "../semantic_ui_react_wrappers"

export function ItemBreadcrumb(props) {
return (
<Breadcrumb size={props.size || "small"}>
<Breadcrumb.Section>{props.report}</Breadcrumb.Section>
{props.subject && (
<>
<Breadcrumb.Divider icon="right chevron" />
<Breadcrumb.Section>{props.subject}</Breadcrumb.Section>
{props.metric && (
<>
<Breadcrumb.Divider icon="right chevron" />
<Breadcrumb.Section>{props.metric}</Breadcrumb.Section>
{props.source && (
<>
<Breadcrumb.Divider icon="right chevron" />
<Breadcrumb.Section>{props.source}</Breadcrumb.Section>
</>
)}
</>
)}
</>
)}
</Breadcrumb>
<Breadcrumbs separator={<NavigateNextIcon fontSize="small" />}>
<span>{props.report}</span>
{props.subject && <span>{props.subject}</span>}
{props.metric && <span>{props.metric}</span>}
{props.source && <span>{props.source}</span>}
</Breadcrumbs>
)
}
ItemBreadcrumb.propTypes = {
metric: string,
report: string,
size: string,
source: string,
subject: string,
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function ActionAndItemPickerButton({ action, itemType, onChange, get_opti
>
<MenuItem disabled divider>
<Typography variant="button">
<ItemBreadcrumb size="tiny" {...breadcrumbProps} />
<ItemBreadcrumb {...breadcrumbProps} />
</Typography>
</MenuItem>
{get_options().map((option) => (
Expand Down

0 comments on commit a4cd919

Please sign in to comment.