2019-09-11 01:53:01 +02:00
|
|
|
const { createSelector } = require('reselect');
|
2020-11-07 17:59:37 +02:00
|
|
|
const { themeStyle } = require('@joplin/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',
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2023-06-01 13:02:36 +02:00
|
|
|
output.buttonIconSelected = { ...output.buttonIcon, color: theme.highlightedColor };
|
2019-09-11 01:53:01 +02:00
|
|
|
|
2023-06-01 13:02:36 +02:00
|
|
|
output.buttonLabelSelected = { ...output.buttonLabel, color: theme.color };
|
2019-09-11 01:53:01 +02:00
|
|
|
|
|
|
|
return output;
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
module.exports = style;
|