1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

All: Refactored themes to allow using the same ones in both desktop and mobile version

Will also allow using them when exporting HTML or PDF from CLI.
This commit is contained in:
Laurent Cozic
2020-06-10 22:08:59 +01:00
parent d80cf6bf37
commit b7f5f848f2
71 changed files with 297 additions and 371 deletions

View File

@ -1,27 +1,11 @@
const React = require('react');
const { StyleSheet } = require('react-native');
const { globalStyle, themeStyle } = require('lib/components/global-style.js');
const styleObject_ = {
screen: {
flex: 1,
backgroundColor: globalStyle.backgroundColor,
},
};
const styles_ = StyleSheet.create(styleObject_);
const { themeStyle } = require('lib/components/global-style.js');
const rootStyles_ = {};
class BaseScreenComponent extends React.Component {
styles() {
return styles_;
}
styleObject() {
return styleObject_;
}
rootStyle(themeId) {
const theme = themeStyle(themeId);