Skip to content

Commit

Permalink
update props type
Browse files Browse the repository at this point in the history
  • Loading branch information
koji committed Apr 2, 2024
1 parent ace06c7 commit 5989032
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export function ProtocolRunRuntimeParameters({
</Flex>
{!hasParameter ? (
<Flex padding={SPACING.spacing16}>
<ProtocolRunEmptyState />
<ProtocolRunEmptyState contentType="parameters" />
</Flex>
) : (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function ProtocolParameters({
<ParametersTable runTimeParameters={runTimeParameters} t={t} />
</Flex>
) : (
<ProtocolRunEmptyState />
<ProtocolRunEmptyState contentType="parameters" />
)}
</Flex>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import { Flex } from '../../primitives'
import { ALIGN_CENTER, DIRECTION_COLUMN } from '../../styles'

interface ProtocolRunEmptyStateProps {
contentType?: 'parameters' | 'moduleControls'
contentType: 'parameters' | 'moduleControls'
}

export function ProtocolRunEmptyState({
contentType = 'parameters',
contentType,
}: ProtocolRunEmptyStateProps): JSX.Element {
const bodyText =
contentType === 'parameters'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ describe('NoParameters', () => {
contentType: 'parameters',
}
})

it('should render text and icon with proper color - parameters', () => {
render(props)
screen.getByLabelText('alert')
Expand Down

0 comments on commit 5989032

Please sign in to comment.