-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: export raw WO+Inv-related icons for better styling
- Loading branch information
1 parent
5c7315a
commit af312bf
Showing
10 changed files
with
77 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import SvgIcon from "@mui/material/SvgIcon"; | ||
import { ReactComponent as RoadIconSVG } from "./fa-road.svg"; | ||
|
||
export const RoadIcon = (props: React.ComponentProps<typeof SvgIcon>) => { | ||
return <SvgIcon component={RoadIconSVG} inheritViewBox {...props} />; | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
export { RoadIcon } from "./RoadIcon"; |
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,6 @@ | ||
import SvgIcon from "@mui/material/SvgIcon"; | ||
import { ReactComponent as TrowelBricksIconSVG } from "./fa-trowel-bricks.svg"; | ||
|
||
export const TrowelBricksIcon = (props: React.ComponentProps<typeof SvgIcon>) => { | ||
return <SvgIcon component={TrowelBricksIconSVG} inheritViewBox {...props} />; | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
export { TrowelBricksIcon } from "./TrowelBricksIcon"; |
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,45 @@ | ||
import RectanglesIcon from "@mui/icons-material/ViewQuilt"; | ||
import LightningBoltIcon from "@mui/icons-material/FlashOn"; | ||
import LayersIcon from "@mui/icons-material/Layers"; | ||
import HomeRepairServiceIcon from "@mui/icons-material/HomeRepairService"; | ||
import AirIcon from "@mui/icons-material/Air"; | ||
import TreesIcon from "@mui/icons-material/Forest"; | ||
import PaintRollerIcon from "@mui/icons-material/FormatPaint"; | ||
import PestBugIcon from "@mui/icons-material/PestControl"; | ||
import PlumbingIcon from "@mui/icons-material/Plumbing"; | ||
import RoofingIcon from "@mui/icons-material/Roofing"; | ||
import TrashCanIcon from "@mui/icons-material/DeleteOutline"; | ||
import ToolsIcon from "@mui/icons-material/Construction"; | ||
import WindowIcon from "@mui/icons-material/Window"; | ||
import { TrowelBricksIcon } from "./TrowelBricksIcon"; | ||
import { RoadIcon } from "./RoadIcon"; | ||
import type SvgIcon from "@mui/material/SvgIcon"; | ||
import type { WorkOrder } from "@types"; | ||
|
||
export const WorkOrderCategoryIcon = ({ | ||
category, | ||
...props | ||
}: { | ||
category: Extract<WorkOrder["category"], string>; | ||
} & React.ComponentProps<typeof SvgIcon>) => { | ||
const CategoryIcon = () => WO_CATEGORY_ICONS[category]; | ||
return <CategoryIcon {...props} />; | ||
}; | ||
|
||
export const WO_CATEGORY_ICONS = { | ||
DRYWALL: <RectanglesIcon />, | ||
ELECTRICAL: <LightningBoltIcon />, | ||
FLOORING: <LayersIcon />, | ||
GENERAL: <HomeRepairServiceIcon />, | ||
HVAC: <AirIcon />, | ||
LANDSCAPING: <TreesIcon />, | ||
MASONRY: <TrowelBricksIcon />, | ||
PAINTING: <PaintRollerIcon />, | ||
PAVING: <RoadIcon />, | ||
PEST: <PestBugIcon />, | ||
PLUMBING: <PlumbingIcon />, | ||
ROOFING: <RoofingIcon />, | ||
TRASH: <TrashCanIcon />, | ||
TURNOVER: <ToolsIcon />, | ||
WINDOWS: <WindowIcon /> | ||
}; |
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,7 +1,11 @@ | ||
// Font Awesome icons: | ||
export { FileInvoiceDollarIcon } from "./FileInvoiceDollarIcon"; | ||
export { PersonCircleExclamationIcon } from "./PersonCircleExclamationIcon"; | ||
export { RoadIcon } from "./RoadIcon"; | ||
export { StripeIcon } from "./StripeIcon"; | ||
export { TrowelBricksIcon } from "./TrowelBricksIcon"; | ||
|
||
// Fixit item icons: | ||
export { InvoiceStatusIcon } from "./InvoiceStatusIcon"; | ||
export { WorkOrderStatusIcon } from "./WorkOrderStatusIcon"; | ||
export { InvoiceStatusIcon, INV_STATUS_ICONS } from "./InvoiceStatusIcon"; | ||
export { WorkOrderCategoryIcon, WO_CATEGORY_ICONS } from "./WorkOrderCategoryIcon"; | ||
export { WorkOrderStatusIcon, WO_STATUS_ICONS } from "./WorkOrderStatusIcon"; |