Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jerader committed Apr 9, 2024
1 parent e2a2894 commit 5f36841
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions components/src/instrument/InstrumentInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ export interface InstrumentInfoProps {
/** children to display under the info */
children?: React.ReactNode
/** if true, show labels 'LEFT PIPETTE' / 'RIGHT PIPETTE' */
showMountLabel?: boolean | null
showMountLabel?: boolean
}

const MAX_WIDTH = '14rem'

export function InstrumentInfo(props: InstrumentInfoProps): JSX.Element {
const {
mount,
Expand Down Expand Up @@ -61,27 +63,27 @@ export function InstrumentInfo(props: InstrumentInfoProps): JSX.Element {
>
{showMountLabel && !has96Channel ? `${mount} pipette` : 'pipette'}
</StyledText>
<StyledText as="p" width="max-content" maxWidth="14rem">
<StyledText as="p" width="max-content" maxWidth={MAX_WIDTH}>
{description}
</StyledText>
</Flex>

<Flex flexDirection={DIRECTION_COLUMN} gridGap={SPACING.spacing4}>
<StyledText as="h3" fontWeight={TYPOGRAPHY.fontWeightSemiBold}>
Tip rack
{'Tip rack'}
</StyledText>
<ul>
{tiprackModels != null ? (
{tiprackModels != null && tiprackModels.length > 0 ? (
tiprackModels.map((model, index) => (
<li key={`${model}_${index}`}>
<StyledText as="p" width="max-content" maxWidth="14rem">
<StyledText as="p" width="max-content" maxWidth={MAX_WIDTH}>
{model}
</StyledText>
</li>
))
) : (
<StyledText as="p" width="max-content" maxWidth="14rem">
None
<StyledText as="p" width="max-content" maxWidth={MAX_WIDTH}>
{'None'}
</StyledText>
)}
</ul>
Expand Down

0 comments on commit 5f36841

Please sign in to comment.