1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-27 08:21:03 +02:00
joplin/packages/app-mobile/components/base-screen.js
2021-06-19 17:32:36 +01:00

23 lines
532 B
JavaScript

const React = require('react');
const { StyleSheet } = require('react-native');
const { themeStyle } = require('./global-style.js');
const rootStyles_ = {};
class BaseScreenComponent extends React.Component {
rootStyle(themeId) {
const theme = themeStyle(themeId);
if (rootStyles_[themeId]) return rootStyles_[themeId];
rootStyles_[themeId] = StyleSheet.create({
root: {
flex: 1,
backgroundColor: theme.backgroundColor,
},
});
return rootStyles_[themeId];
}
}
module.exports = { BaseScreenComponent };