App layout prop update

This commit is contained in:
tmshv committed 2019-10-17 14:50:09 +03:00
1 parent 228e7824de
commit 3902815113
11 files changed
+89 -100

No files matched your search

+2 -3
View File
@@ -16,11 +16,10 @@ export interface IAppProps {
menu: any
showAuthor: boolean
menuPadding: boolean
layout?: 'full' | 'wide' | 'thin'
layout: 'full' | 'wide' | 'thin'
}
export const App: React.FC<IAppProps> = props => {
const layout = props.layout ? props.layout : 'full'
const motionDisabled = useReducedMotion()
return (
@@ -36,7 +35,7 @@ export const App: React.FC<IAppProps> = props => {
</header>
<main className="body-wrapper__content">
<section className={cx('content', `content_${layout}`, {
<section className={cx('content', `content_${props.layout}`, {
'content--padding-top--menu': props.menuPadding,
'reduced-motion': motionDisabled,
})}>