hide default content conponent if hidePresentation and autoSwapLayout
This commit is contained in:
parent
851e63f557
commit
321d2cbd37
@ -1,9 +1,14 @@
|
||||
import React from 'react';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
import { TransitionGroup, CSSTransition } from 'react-transition-group';
|
||||
import cx from 'classnames';
|
||||
import { styles } from './styles.scss';
|
||||
|
||||
export default () => (
|
||||
const LAYOUT_CONFIG = Meteor.settings.public.layout;
|
||||
|
||||
export default () => {
|
||||
const { autoSwapLayout, hidePresentation } = LAYOUT_CONFIG;
|
||||
return (
|
||||
<TransitionGroup>
|
||||
<CSSTransition
|
||||
classNames={{
|
||||
@ -17,7 +22,10 @@ export default () => (
|
||||
className={styles.contentWrapper}
|
||||
>
|
||||
<div className={styles.content}>
|
||||
<div className={styles.defaultContent}>
|
||||
<div className={cx(styles.defaultContent, {
|
||||
[styles.hideContent]: autoSwapLayout && hidePresentation,
|
||||
})}
|
||||
>
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id="app.home.greeting"
|
||||
@ -30,4 +38,5 @@ export default () => (
|
||||
</div>
|
||||
</CSSTransition>
|
||||
</TransitionGroup>
|
||||
);
|
||||
);
|
||||
};
|
||||
|
@ -36,6 +36,10 @@
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.hideContent {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.appear {
|
||||
opacity: 0.01;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user