Page component updated + ts
This commit is contained in:
1 parent
8163c35efe
commit
0e7b312d97
3 files changed
+23
-21
No files matched your search
+2
-2
@@ -1,7 +1,7 @@
|
||||
import React from 'react'
|
||||
import Head from 'next/head'
|
||||
import { App } from '../src/components/App'
|
||||
import Page from '../src/components/Page'
|
||||
import { Page } from '../src/components/Page'
|
||||
import menuModel from '../src/models/menu'
|
||||
import { buildMenu } from '../src/lib/menu'
|
||||
import { Meta } from '../src/components/Meta'
|
||||
@@ -21,7 +21,7 @@ const Index = (props) => (
|
||||
|
||||
<div className={'content content_thin'}>
|
||||
<Page
|
||||
shareable={true}
|
||||
showSocialShare={true}
|
||||
>
|
||||
{props.content}
|
||||
</Page>
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
import React from 'react'
|
||||
import Share from './Share'
|
||||
import Html from './Html'
|
||||
|
||||
export default function Page({ children, shareable }) {
|
||||
return (
|
||||
<div className={'Article Article--cloud'}>
|
||||
<div className={'Article-Body'}>
|
||||
<Html
|
||||
html={children}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{!shareable ? null : (
|
||||
<Share />
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import * as React from 'react'
|
||||
import Share from '../Share'
|
||||
import Html from '../Html'
|
||||
|
||||
export interface IPageProps {
|
||||
showSocialShare: boolean
|
||||
}
|
||||
|
||||
export const Page: React.FC<IPageProps> = props => (
|
||||
<div className={'Article Article--cloud'}>
|
||||
<div className={'Article-Body'}>
|
||||
<Html
|
||||
html={props.children}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{!props.showSocialShare ? null : (
|
||||
<Share />
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
Reference in new issue
Block a user