content wide rm

This commit is contained in:
tmshv committed 2021-09-22 16:05:46 +03:00
1 parent b25f8eb0e9
commit 2be00d53a4
5 files changed
+3 -14

No files matched your search

+3 -4
View File
@@ -16,13 +16,12 @@ const Navigation = dynamic(() => import('../Navigation').then(mod => mod.Navigat
export interface IAppProps {
showAuthor?: boolean
wide?: boolean
contentStyle?: React.CSSProperties
breadcrumbs?: IBreadcumbsPart[]
menu: IMenu[]
}
export const App: React.FC<IAppProps> = ({ showAuthor = false, wide = false, menu, ...props }) => {
export const App: React.FC<IAppProps> = ({ showAuthor = false, menu, ...props }) => {
const hideBreadcrumbs = useMobile()
const router = useRouter()
const blockStyle = {
@@ -42,7 +41,7 @@ export const App: React.FC<IAppProps> = ({ showAuthor = false, wide = false, men
}} />
{hideBreadcrumbs || !props.breadcrumbs ? null : (
<Block direction={'horizontal'} style={blockStyle}>
<Content wide={wide}>
<Content>
<Breadcrumbs
items={props.breadcrumbs}
path={router.asPath}
@@ -59,7 +58,7 @@ export const App: React.FC<IAppProps> = ({ showAuthor = false, wide = false, men
)}
>
<Block direction={'horizontal'} style={blockStyle}>
<Content wide={wide} style={props.contentStyle}>
<Content style={props.contentStyle}>
{props.children}
</Content>
</Block>
-2
View File
@@ -3,7 +3,6 @@ import { useReducedMotion } from 'src/hooks/useReducedMotion'
export type ContentProps = {
style?: React.CSSProperties
wide: boolean
}
export const Content: React.FC<ContentProps> = props => {
@@ -13,7 +12,6 @@ export const Content: React.FC<ContentProps> = props => {
<div
className={cx('content', {
'reduced-motion': motionDisabled,
'content_wide': props.wide,
})}
style={props.style}
>