Skip to content

Commit

Permalink
refactor(components): update height props in InfoScreen
Browse files Browse the repository at this point in the history
update height prop in InsoScreen and update tests

close AUTH-
  • Loading branch information
koji committed Jan 9, 2025
1 parent a3f541d commit d8a35e9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 20 additions & 0 deletions components/src/molecules/InfoScreen/__tests__/InfoScreen.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,25 @@ describe('InfoScreen', () => {
expect(screen.getByLabelText('alert')).toHaveStyle(
`color: ${COLORS.grey60}`
)
expect(screen.getByTestId('InfoScreen')).toHaveStyle(
`height: 100%`
)
})

it('should render set height, subContent and backgroundColor', () => {
props = {
...props,
subContent: 'mock sub content',
backgroundColor: COLORS.blue50,
height: '10rem',
}
render(props)
screen.getByText('mock sub content')
expect(screen.getByTestId('InfoScreen')).toHaveStyle(
`background-color: ${COLORS.blue50}`
)
expect(screen.getByTestId('InfoScreen')).toHaveStyle(
`height: 10rem`
)
})
})
2 changes: 1 addition & 1 deletion components/src/molecules/InfoScreen/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function InfoScreen({
content,
subContent,
backgroundColor = COLORS.grey30,
height,
height = "100%",
}: InfoScreenProps): JSX.Element {
return (
<Flex
Expand Down

0 comments on commit d8a35e9

Please sign in to comment.