2019-09-11 01:53:01 +02:00
|
|
|
const { createSelector } = require('reselect');
|
2020-11-05 18:58:23 +02:00
|
|
|
const { themeStyle } = require('@joplinapp/lib/theme');
|
2019-09-11 01:53:01 +02:00
|
|
|
|
2020-09-15 15:01:07 +02:00
|
|
|
const themeSelector = (state, props) => themeStyle(props.themeId);
|
2019-09-11 01:53:01 +02:00
|
|
|
|
|
|
|
const style = createSelector(
|
|
|
|
themeSelector,
|
|
|
|
(theme) => {
|
|
|
|
const output = {
|
|
|
|
button: {
|
|
|
|
fontFamily: theme.fontFamily,
|
|
|
|
minWidth: 52,
|
|
|
|
border: 'none',
|
|
|
|
flexDirection: 'column',
|
|
|
|
display: 'flex',
|
|
|
|
alignItems: 'center',
|
|
|
|
padding: 9,
|
|
|
|
backgroundColor: theme.backgroundColor,
|
2020-04-08 12:12:25 +02:00
|
|
|
userSelect: 'none',
|
2019-09-11 01:53:01 +02:00
|
|
|
},
|
|
|
|
buttonIcon: {
|
|
|
|
fontSize: 24,
|
2020-05-17 16:34:42 +02:00
|
|
|
color: theme.iconColor,
|
2019-09-11 01:53:01 +02:00
|
|
|
},
|
|
|
|
buttonLabel: {
|
|
|
|
display: 'flex',
|
|
|
|
flex: 1,
|
|
|
|
alignItems: 'flex-end',
|
|
|
|
color: theme.colorFaded,
|
|
|
|
},
|
|
|
|
root: {
|
|
|
|
minHeight: 58,
|
|
|
|
display: 'flex',
|
|
|
|
borderBottomWidth: 1,
|
|
|
|
borderBottomStyle: 'solid',
|
|
|
|
borderBottomColor: theme.dividerColor,
|
|
|
|
},
|
|
|
|
barButtons: {
|
|
|
|
display: 'flex',
|
|
|
|
flexDirection: 'row',
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
output.buttonIconSelected = Object.assign({}, output.buttonIcon, {
|
|
|
|
color: theme.highlightedColor,
|
|
|
|
});
|
|
|
|
|
|
|
|
output.buttonLabelSelected = Object.assign({}, output.buttonLabel, {
|
|
|
|
color: theme.color,
|
|
|
|
});
|
|
|
|
|
|
|
|
return output;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
module.exports = style;
|