introduce imgHeight as prop to page wrapper

This commit is contained in:
Ivana Andersson 2023-09-01 13:33:42 +03:00
parent a5c551760b
commit 17c5b91ecf
4 changed files with 14 additions and 4 deletions

View File

@ -8,6 +8,7 @@ type PageWrapperShadowProps = {
rightImageSrc?: string
rightImageLogo?: boolean
children: ReactNode
imgHeight?: string
}
const PageWrapperShadow = ({
@ -15,6 +16,7 @@ const PageWrapperShadow = ({
rightImageSrc,
rightImageLogo,
children,
imgHeight,
}: PageWrapperShadowProps) => {
const theme = useTheme()
@ -28,7 +30,12 @@ const PageWrapperShadow = ({
</section>
<section className="layout-right">
<div className="image-container">
<img src={rightImageSrc} alt="background" className="background-img" />
<img
src={rightImageSrc}
alt="background"
className="background-img"
style={{ height: imgHeight }}
/>
{rightImageLogo ? <NimbusLogoMark /> : null}
</div>
</section>

View File

@ -16,7 +16,7 @@ const DeviceHealthCheck = () => {
const deviceHealthState = useSelector((state: RootState) => state.deviceHealth)
return (
<PageWrapperShadow rightImageSrc="./background-images/eye-background.png">
<PageWrapperShadow rightImageSrc="./background-images/eye-background.png" imgHeight="100%">
<YStack
space={'$4'}
style={{

View File

@ -23,7 +23,10 @@ const DeviceSyncStatus = () => {
)
}, [dispatch])
return (
<PageWrapperShadow rightImageSrc="./background-images/sync-status-background.png">
<PageWrapperShadow
rightImageSrc="./background-images/sync-status-background.png"
imgHeight="120%"
>
<YStack
space={'$4'}
style={{

View File

@ -17,7 +17,7 @@ const LandingPage = () => {
return (
<>
<PageWrapperShadow rightImageSrc="./background-images/landing-page-bg.png">
<PageWrapperShadow rightImageSrc="./background-images/landing-page-bg.png" imgHeight="150%">
<YStack className="landing-page">
<XStack pt={'70px'}>
<NimbusLogo />