ecency-mobile/src/containers/themeContainer.js
2020-03-24 12:52:23 +02:00

20 lines
402 B
JavaScript

/* eslint-disable no-unused-vars */
import React from 'react';
import { connect } from 'react-redux';
const ThemeContainer = ({ children, isDarkTheme }) => {
return (
children &&
children({
isDarkTheme,
})
);
};
const mapStateToProps = (state) => ({
isDarkTheme: state.application.isDarkTheme,
});
export default connect(mapStateToProps)(ThemeContainer);
/* eslint-enable */