fix: add children instead of content for page wrapper

This commit is contained in:
RadoslavDimchev 2023-08-15 09:57:46 +03:00
parent 676bb2d0b5
commit 99a662570c
4 changed files with 16 additions and 17 deletions

View File

@ -2,7 +2,7 @@ import { useState } from 'react'
import BreadcrumbBar from './BreadcrumbBar' import BreadcrumbBar from './BreadcrumbBar'
import { Button as StatusButton, Tag, Text, Avatar, Checkbox } from '@status-im/components' import { Button as StatusButton, Tag, Text, Avatar, Checkbox } from '@status-im/components'
import { Label, Separator, XStack, YStack } from 'tamagui' import { Label, Separator, XStack, YStack } from 'tamagui'
import LayoutComponent from './PageWrapperShadow' import PageWrapperShadow from './PageWrapperShadow'
import NimbusLogo from './NimbusLogo' import NimbusLogo from './NimbusLogo'
import Titles from './Titles' import Titles from './Titles'
import NodeIcon from './NodeIcon' import NodeIcon from './NodeIcon'
@ -13,10 +13,11 @@ import LabelInputField from './LabelInputField'
function ContentPage() { function ContentPage() {
return ( return (
<LayoutComponent <PageWrapperShadow
breadcrumbBar={<BreadcrumbBar breadcrumbList={['Nodes', 'Nimbus', 'Connect Device']} />} breadcrumbBar={<BreadcrumbBar breadcrumbList={['Nodes', 'Nimbus', 'Connect Device']} />}
content={<Content />} >
/> <Content />
</PageWrapperShadow>
) )
} }

View File

@ -1,14 +1,13 @@
import LayoutComponent from './PageWrapperShadow' import PageWrapperShadow from './PageWrapperShadow'
import './LandingPage.css' import './LandingPage.css'
import QuickStartBar from './QuickStartBar' import QuickStartBar from './QuickStartBar'
function LandingPage() { function LandingPage() {
return ( return (
<> <>
<LayoutComponent <PageWrapperShadow rightImageSrc="src/assets/bg-img/landing-page-bg.png">
content={<Content />} <Content />
rightImageSrc="src/assets/bg-img/landing-page-bg.png" </PageWrapperShadow>
/>
<QuickStartBar /> <QuickStartBar />
</> </>
) )

View File

@ -3,16 +3,16 @@ import './layout.css'
type PageWrapperShadowProps = { type PageWrapperShadowProps = {
breadcrumbBar?: ReactNode breadcrumbBar?: ReactNode
content: ReactNode
rightImageSrc?: string rightImageSrc?: string
children: ReactNode
} }
const PageWrapperShadow = ({ breadcrumbBar, content, rightImageSrc }: PageWrapperShadowProps) => { const PageWrapperShadow = ({ breadcrumbBar, rightImageSrc, children }: PageWrapperShadowProps) => {
return ( return (
<div className="layout"> <div className="layout">
<section className="layout-left"> <section className="layout-left">
{breadcrumbBar} {breadcrumbBar}
<div className="container">{content}</div> <div className="container">{children}</div>
</section> </section>
<section className="layout-right"> <section className="layout-right">
<div className="image-container"> <div className="image-container">

View File

@ -1,5 +1,5 @@
import { Stack, XStack, YStack } from 'tamagui' import { Stack, XStack, YStack } from 'tamagui'
import LayoutComponent from '../../components/PageWrapperShadow' import PageWrapperShadow from '../../components/PageWrapperShadow'
import NimbusLogo from '../../components/NimbusLogo' import NimbusLogo from '../../components/NimbusLogo'
import Titles from '../../components/Titles' import Titles from '../../components/Titles'
import DeviceStorageHealth from '../../components/DeviceStorageHealth' import DeviceStorageHealth from '../../components/DeviceStorageHealth'
@ -12,10 +12,9 @@ import DeviceNetworkHealth from '../../components/DeviceNetworkHealth'
const DeviceHealthCheck = () => { const DeviceHealthCheck = () => {
return ( return (
<LayoutComponent <PageWrapperShadow rightImageSrc="/background-images/eye-background.png">
content={<DeviceHealthCheckContent />} <DeviceHealthCheckContent />
rightImageSrc="/background-images/eye-background.png" </PageWrapperShadow>
/>
) )
} }