diff --git a/web/src/features/fba/components/infoPanel/TabPanel.tsx b/web/src/features/fba/components/infoPanel/TabPanel.tsx
index a49259023f..229b3d56e4 100644
--- a/web/src/features/fba/components/infoPanel/TabPanel.tsx
+++ b/web/src/features/fba/components/infoPanel/TabPanel.tsx
@@ -1,5 +1,6 @@
import { Box } from '@mui/material'
import React from 'react'
+import { theme } from 'app/theme'
interface TabPanelProps {
children?: React.ReactNode
@@ -9,7 +10,12 @@ interface TabPanelProps {
const TabPanel = ({ children, index, value }: TabPanelProps) => {
return (
-
+
{value === index && {children}}
)
diff --git a/web/src/features/fba/components/viz/ElevationFlag.tsx b/web/src/features/fba/components/viz/ElevationFlag.tsx
index 94dcc06a38..408e40a595 100644
--- a/web/src/features/fba/components/viz/ElevationFlag.tsx
+++ b/web/src/features/fba/components/viz/ElevationFlag.tsx
@@ -1,40 +1,30 @@
import React from 'react'
-import { Box, Grid, Typography } from '@mui/material'
-
-const FLAG_COLOUR = '#CCCCCC'
+import { Typography } from '@mui/material'
+import Grid from '@mui/material/Unstable_Grid2'
+import Flag from '@/features/fba/components/viz/FillableFlag'
interface ElevationFlagProps {
- testId?: string
+ id: string
percent: number
+ testId?: string
}
-const ElevationFlag = ({ percent, testId }: ElevationFlagProps) => {
+const ElevationFlag = ({ id, percent, testId }: ElevationFlagProps) => {
return (
-
-
+
+
-
-
- {percent}%
-
-
-
+ {percent}%
+
)
}
diff --git a/web/src/features/fba/components/viz/ElevationLabel.tsx b/web/src/features/fba/components/viz/ElevationLabel.tsx
index c2efeb1392..8ef9819812 100644
--- a/web/src/features/fba/components/viz/ElevationLabel.tsx
+++ b/web/src/features/fba/components/viz/ElevationLabel.tsx
@@ -7,8 +7,8 @@ interface ElevationLabelProps {
const ElevationLabel = ({ label }: ElevationLabelProps) => {
return (
-
- {label}
+
+ {label}
)
}
diff --git a/web/src/features/fba/components/viz/ElevationStatus.tsx b/web/src/features/fba/components/viz/ElevationStatus.tsx
index 503c0ef605..12c1376217 100644
--- a/web/src/features/fba/components/viz/ElevationStatus.tsx
+++ b/web/src/features/fba/components/viz/ElevationStatus.tsx
@@ -4,14 +4,14 @@ import Grid from '@mui/material/Unstable_Grid2'
import Typography from '@mui/material/Typography'
import ElevationFlag from 'features/fba/components/viz/ElevationFlag'
import ElevationLabel from 'features/fba/components/viz/ElevationLabel'
-import TPIMountain from 'features/fba/components/viz/TPIMountain'
import { Box } from '@mui/material'
import { FireZoneTPIStats } from '@/api/fbaAPI'
+import Mountain from '@/features/fba/images/mountain.svg'
enum ElevationOption {
BOTTOM = 'Valley Bottom',
MID = 'Mid Slope',
- Upper = 'Upper Slope'
+ UPPER = 'Upper Slope'
}
interface ElevationStatusProps {
@@ -25,50 +25,63 @@ const ElevationStatus = ({ tpiStats }: ElevationStatusProps) => {
const upper_percent = tpiStats.upper_slope === 0 ? 0 : Math.round((tpiStats.upper_slope / total) * 100)
const bottom_percent = tpiStats.valley_bottom === 0 ? 0 : Math.round((tpiStats.valley_bottom / total) * 100)
return (
-
-
-
-
-
- Topographic Position:
-
-
-
-
-
+
+
+
+
+ Topographic Position:
+
-
-
-
-
+
+
+ Proportion of Advisory Area:
+
-
-
-
- Proportion of Advisory Area:
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
-
+
)
}
-export default ElevationStatus
+export default ElevationStatus
\ No newline at end of file
diff --git a/web/src/features/fba/components/viz/FillableFlag.tsx b/web/src/features/fba/components/viz/FillableFlag.tsx
new file mode 100644
index 0000000000..99d2229c65
--- /dev/null
+++ b/web/src/features/fba/components/viz/FillableFlag.tsx
@@ -0,0 +1,31 @@
+import React from 'react'
+
+interface FillableFlagProps {
+ maskId: string
+ percent: number
+}
+
+const FillableFlag = ({ maskId, percent }: FillableFlagProps) => {
+ const fillWidth = (percent / 100) * 120
+ return (
+
+ )
+}
+
+export default React.memo(FillableFlag)
\ No newline at end of file
diff --git a/web/src/features/fba/components/viz/TPIMountain.tsx b/web/src/features/fba/components/viz/TPIMountain.tsx
deleted file mode 100644
index 64f59355d9..0000000000
--- a/web/src/features/fba/components/viz/TPIMountain.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-import React from 'react'
-
-export const TPIMountain = () => {
- return (
-
- )
-}
-
-export default React.memo(TPIMountain)
diff --git a/web/src/features/fba/components/viz/elevationFlag.test.tsx b/web/src/features/fba/components/viz/elevationFlag.test.tsx
index b663af3127..7453a3869d 100644
--- a/web/src/features/fba/components/viz/elevationFlag.test.tsx
+++ b/web/src/features/fba/components/viz/elevationFlag.test.tsx
@@ -4,9 +4,7 @@ import ElevationFlag from 'features/fba/components/viz/ElevationFlag'
describe('ElevationFlag', () => {
it('should have width relative to parent', () => {
- const { getByTestId } = render(
-
- )
+ const { getByTestId } = render(
)
const element = getByTestId('valley-bottom')
expect(element).toBeInTheDocument()
diff --git a/web/src/features/fba/components/viz/fillableFlag.test.tsx b/web/src/features/fba/components/viz/fillableFlag.test.tsx
new file mode 100644
index 0000000000..8733b19f15
--- /dev/null
+++ b/web/src/features/fba/components/viz/fillableFlag.test.tsx
@@ -0,0 +1,18 @@
+import React from 'react'
+import { render } from '@testing-library/react'
+import FillableFlag from '@/features/fba/components/viz/FillableFlag'
+
+describe('FillableFlag', () => {
+ it('should render', () => {
+ const maskId = 'test'
+ const { getByRole } = render(
)
+ const element = getByRole('img')
+ expect(element).toBeInTheDocument()
+ })
+ it("should use maskId in svg mask element's id", () => {
+ const maskId = 'test'
+ const result = render(
)
+ const element = result.container.querySelector(`#mask-${maskId}`)
+ expect(element).toBeInTheDocument()
+ })
+})
diff --git a/web/src/features/fba/images/mountain.svg b/web/src/features/fba/images/mountain.svg
new file mode 100644
index 0000000000..109e98dc03
--- /dev/null
+++ b/web/src/features/fba/images/mountain.svg
@@ -0,0 +1,28 @@
+
\ No newline at end of file