-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(app): never hide module/liquid setup (#13134)
- Loading branch information
Showing
8 changed files
with
210 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import * as React from 'react' | ||
import { | ||
Flex, | ||
DIRECTION_COLUMN, | ||
COLORS, | ||
SPACING, | ||
TYPOGRAPHY, | ||
} from '@opentrons/components' | ||
import { StyledText } from '../../../atoms/text' | ||
|
||
interface EmptySetupStepProps { | ||
title: React.ReactNode | ||
description: string | ||
label: string | ||
} | ||
|
||
export function EmptySetupStep(props: EmptySetupStepProps): JSX.Element { | ||
const { title, description, label } = props | ||
return ( | ||
<Flex flexDirection={DIRECTION_COLUMN} color={COLORS.successDisabled}> | ||
<StyledText css={TYPOGRAPHY.h6SemiBold} marginBottom={SPACING.spacing2}> | ||
{label} | ||
</StyledText> | ||
<StyledText css={TYPOGRAPHY.h3SemiBold} marginBottom={SPACING.spacing4}> | ||
{title} | ||
</StyledText> | ||
<StyledText as="p">{description}</StyledText> | ||
</Flex> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
app/src/organisms/Devices/ProtocolRun/__tests__/EmptySetupStep.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React from 'react' | ||
import { renderWithProviders } from '@opentrons/components' | ||
import { i18n } from '../../../../i18n' | ||
import { EmptySetupStep } from '../EmptySetupStep' | ||
|
||
const render = (props: React.ComponentProps<typeof EmptySetupStep>) => { | ||
return renderWithProviders(<EmptySetupStep {...props} />, { | ||
i18nInstance: i18n, | ||
})[0] | ||
} | ||
|
||
describe('EmptySetupStep', () => { | ||
let props: React.ComponentProps<typeof EmptySetupStep> | ||
beforeEach(() => { | ||
props = { | ||
title: 'mockTitle', | ||
description: 'mockDescription', | ||
label: 'mockLabel', | ||
} | ||
}) | ||
|
||
it('should render the title, description, and label', () => { | ||
const { getByText } = render(props) | ||
getByText('mockTitle') | ||
getByText('mockDescription') | ||
getByText('mockLabel') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.