From 8a5807f5df2887e542ee8353dbdc9136ca2968e9 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 21 Apr 2020 15:16:33 -0500 Subject: [PATCH] Set reduceMotion body class --- app/gabsocial/containers/gabsocial.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/gabsocial/containers/gabsocial.js b/app/gabsocial/containers/gabsocial.js index 83b01bf99..4fc8e4336 100644 --- a/app/gabsocial/containers/gabsocial.js +++ b/app/gabsocial/containers/gabsocial.js @@ -43,6 +43,7 @@ const mapStateToProps = (state) => { showIntroduction, me, theme: state.getIn(['settings', 'theme']), + reduceMotion: state.getIn(['settings', 'reduceMotion']), systemFont: state.getIn(['settings', 'systemFont']), dyslexicFont: state.getIn(['settings', 'dyslexicFont']), demetricator: state.getIn(['settings', 'demetricator']), @@ -56,13 +57,14 @@ class GabSocialMount extends React.PureComponent { showIntroduction: PropTypes.bool, me: PropTypes.string, theme: PropTypes.string, + reduceMotion: PropTypes.bool, systemFont: PropTypes.bool, dyslexicFont: PropTypes.bool, demetricator: PropTypes.bool, }; render() { - const { me, theme, systemFont, dyslexicFont, demetricator } = this.props; + const { me, theme, reduceMotion, systemFont, dyslexicFont, demetricator } = this.props; if (me === null) return null; // Disabling introduction for launch @@ -75,6 +77,7 @@ class GabSocialMount extends React.PureComponent { const bodyClass = classNames('app-body', { [`theme-${theme}`]: theme, 'system-font': systemFont, + 'no-reduce-motion': !reduceMotion, 'dyslexic': dyslexicFont, 'demetricator': demetricator, });