Skip to content

Commit

Permalink
update navbar to align with the design
Browse files Browse the repository at this point in the history
  • Loading branch information
koji committed Nov 14, 2024
1 parent 8685d7b commit 7421514
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
11 changes: 9 additions & 2 deletions protocol-designer/src/organisms/ProtocolNavBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ interface ProtocolNavBarProps {
showLiquidOverflowMenu?: (liquidOverflowMenu: boolean) => void
isAddingHardwareOrLabware?: boolean
liquidPage?: boolean
isOffDeck?: boolean
}

export function ProtocolNavBar({
Expand All @@ -39,6 +40,7 @@ export function ProtocolNavBar({
hasTrashEntity,
showLiquidOverflowMenu,
liquidPage = false,
isOffDeck = false,
}: ProtocolNavBarProps): JSX.Element {
const { t } = useTranslation('starting_deck_state')
const metadata = useSelector(getFileMetadata)
Expand All @@ -54,13 +56,18 @@ export function ProtocolNavBar({
<StyledText
desktopStyle="bodyDefaultSemiBold"
css={LINE_CLAMP_TEXT_STYLE(1)}
textAlign={isOffDeck && TYPOGRAPHY.textAlignLeft}
>
{metadata?.protocolName != null && metadata?.protocolName !== ''
? metadata?.protocolName
: t('untitled_protocol')}
</StyledText>
<StyledText desktopStyle="bodyDefaultRegular" color={COLORS.grey60}>
{isAddingHardwareOrLabware
<StyledText
desktopStyle="bodyDefaultRegular"
color={COLORS.grey60}
textAlign={isOffDeck && TYPOGRAPHY.textAlignLeft}
>
{isAddingHardwareOrLabware || isOffDeck
? t('add_hardware_labware')
: t('edit_protocol')}
</StyledText>
Expand Down
1 change: 1 addition & 0 deletions protocol-designer/src/pages/Designer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ export function Designer(): JSX.Element {
hasTrashEntity={hasTrashEntity}
showLiquidOverflowMenu={showLiquidOverflowMenu}
tabs={[startingDeckTab, protocolStepTab]}
isOffDeck={deckView !== leftString}
/>

{tab === 'startingDeck' ? (
Expand Down

0 comments on commit 7421514

Please sign in to comment.