mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
b7f5f848f2
Will also allow using them when exporting HTML or PDF from CLI.
24 lines
546 B
JavaScript
24 lines
546 B
JavaScript
const React = require('react');
|
|
|
|
const { StyleSheet } = require('react-native');
|
|
const { themeStyle } = require('lib/components/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 };
|