Skip to content

Commit

Permalink
rename width variable on per-label basis
Browse files Browse the repository at this point in the history
  • Loading branch information
ncdiehl11 committed Nov 14, 2023
1 parent 0d99043 commit bf2d867
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions components/src/hardware-sim/Deck/SlotLabels.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const SlotLabels = ({
color,
show4thColumn = false,
}: SlotLabelsProps): JSX.Element | null => {
const widthColumnLabelsRem = 30.375
const widthPerColumnLabelRem = 10.125

return robotType === FLEX_ROBOT_TYPE ? (
<>
Expand Down Expand Up @@ -76,7 +76,9 @@ export const SlotLabels = ({
<RobotCoordsForeignObject
height="2.5rem"
width={`${
show4thColumn ? (widthColumnLabelsRem * 4) / 3 : widthColumnLabelsRem
show4thColumn
? widthPerColumnLabelRem * 4
: widthPerColumnLabelRem * 3
}rem`}
x="-15"
y="-55"
Expand All @@ -86,8 +88,8 @@ export const SlotLabels = ({
flex="1"
width={`${
show4thColumn
? (widthColumnLabelsRem * 4) / 3
: widthColumnLabelsRem
? widthPerColumnLabelRem * 4
: widthPerColumnLabelRem * 3
}rem`}
height="2.5rem"
>
Expand Down

0 comments on commit bf2d867

Please sign in to comment.