Skip to content

Commit

Permalink
Prop changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fwaalkens committed Jan 17, 2024
1 parent b57e584 commit 5528fff
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/app/Marine2/components/boxes/Charger/Charger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { formatModeFor } from "../../../utils/formatters/devices/charger/format-
interface Props {
instanceId: ChargerInstanceId
componentMode?: ComponentMode
compactBoxSize?: ISize
compactBoxSize: ISize
}

const Charger = ({ instanceId, componentMode = "compact", compactBoxSize }: Props) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const getAvailableDeviceBoxes = function (
vebusInstanceId: InstanceId,
generatorFp: GeneratorFpProvider,
generatorRelay: GeneratorRelayProvider,
compactBoxSize: { width: number; height: number },
compactBoxSize: ISize,
componentMode?: ComponentMode
) {
let devices = []
Expand Down
11 changes: 6 additions & 5 deletions src/app/Marine2/components/ui/BatterySummary/BatterySummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { formatValue } from "../../../utils/formatters"
import { Battery } from "@victronenergy/mfd-modules"
import classNames from "classnames"
import { applyStyles, BreakpointStylesType } from "../../../utils/media"
import { ISize } from "@m2Types/generic/size"

const styles: BreakpointStylesType = {
default: {
Expand Down Expand Up @@ -31,6 +32,11 @@ const styles: BreakpointStylesType = {
},
}

interface Props {
battery: Battery
boxSize: ISize
}

const BatterySummary = ({ battery, boxSize }: Props) => {
const activeStyles = applyStyles(boxSize, styles)

Expand Down Expand Up @@ -73,9 +79,4 @@ const BatterySummary = ({ battery, boxSize }: Props) => {
)
}

interface Props {
battery: Battery
boxSize: { width: number; height: number }
}

export default BatterySummary
6 changes: 3 additions & 3 deletions src/app/Marine2/components/ui/ValueBox/ValueBox.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Box from "../Box"
import classNames from "classnames"
import { FC, ReactElement, useState } from "react"
import { FC, ReactElement, ReactNode, useState } from "react"
import { applyStyles, defaultBoxStyles } from "../../../utils/media"
import { ValueWithUnit } from "@m2Types/data/value-with-units"
import { BottomValues } from "./BottomValues/BottomValues"
Expand All @@ -17,8 +17,8 @@ interface Props {
value?: number
unit?: unit
bottomValues: ValueWithUnit[][]
children?: JSX.Element | JSX.Element[] | string
buttons?: JSX.Element | JSX.Element[]
children?: ReactNode
buttons?: ReactNode | ReactNode[]
infoText?: { title: string; body: string }
valueSubtitle?: string
status?: TStatus
Expand Down

0 comments on commit 5528fff

Please sign in to comment.