Skip to content

Commit

Permalink
fix custom stylesheet for commonjs
Browse files Browse the repository at this point in the history
  • Loading branch information
suneox committed Mar 11, 2024
1 parent 7d29982 commit b78042b
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/agenda/reservation-list/style.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {StyleSheet} from 'react-native';
import get from 'lodash/get';
import * as defaultStyle from '../../style';
import {Theme} from '../../types';

Expand Down Expand Up @@ -37,6 +38,6 @@ export default function styleConstructor(theme: Theme = {}) {
indicator: {
marginTop: 80
},
...(theme['stylesheet.agenda.list'] || {})
...get(theme, 'stylesheet.agenda.list', {})
});
}
3 changes: 2 additions & 1 deletion src/agenda/style.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {StyleSheet} from 'react-native';
import get from 'lodash/get';
import * as defaultStyle from '../style';
import platformStyles from './platform-style';
import {Theme} from '../types';
Expand Down Expand Up @@ -52,6 +53,6 @@ export default function styleConstructor(theme: Theme = {}) {
width: '100%',
alignSelf: 'center'
},
...(theme['stylesheet.agenda.main'] || {})
...get(theme, 'stylesheet.agenda.main', {})
});
}
3 changes: 2 additions & 1 deletion src/calendar/day/basic/style.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {StyleSheet} from 'react-native';
import get from 'lodash/get';
import * as defaultStyle from '../../../style';
import {Theme} from '../../../types';
import constants from '../../../commons/constants';
Expand Down Expand Up @@ -68,6 +69,6 @@ export default function styleConstructor(theme: Theme = {}) {
todayDot: {
backgroundColor: appStyle.todayDotColor || appStyle.dotColor
},
...(theme['stylesheet.day.basic'] || {})
...get(theme, 'stylesheet.day.basic', {})
});
}
3 changes: 2 additions & 1 deletion src/calendar/day/dot/style.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {StyleSheet} from 'react-native';
import get from 'lodash/get';
import * as defaultStyle from '../../../style';
import {Theme} from '../../../types';

Expand Down Expand Up @@ -30,6 +31,6 @@ export default function styleConstructor(theme: Theme = {}) {
todayDot: {
backgroundColor: appStyle.todayDotColor || appStyle.dotColor
},
...(theme['stylesheet.dot'] || {})
...get(theme, 'stylesheet.dot', {})
});
}
3 changes: 2 additions & 1 deletion src/calendar/day/marking/style.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {StyleSheet} from 'react-native';
import get from 'lodash/get';
import * as defaultStyle from '../../style';
import {Theme} from '../../../types';

Expand Down Expand Up @@ -26,6 +27,6 @@ export default function styleConstructor(theme: Theme = {}) {
borderBottomRightRadius: 2,
marginRight: 4
},
...(theme['stylesheet.marking'] || {})
...get(theme, 'stylesheet.marking', {})
});
}
3 changes: 2 additions & 1 deletion src/calendar/day/period/style.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {StyleSheet} from 'react-native';
import get from 'lodash/get';
import * as defaultStyle from '../../../style';
import {Theme} from '../../../types';

Expand Down Expand Up @@ -64,6 +65,6 @@ export default function styleConstructor(theme: Theme = {}) {
inactiveText: {
color: appStyle.textInactiveColor
},
...(theme['stylesheet.day.period'] || {})
...get(theme, 'stylesheet.day.period', {})
});
}
3 changes: 2 additions & 1 deletion src/calendar/header/style.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {StyleSheet, Platform} from 'react-native';
import get from 'lodash/get';
import * as defaultStyle from '../../style';
import {Theme} from '../../types';
import constants from '../../commons/constants';
Expand Down Expand Up @@ -68,6 +69,6 @@ export default function (theme: Theme = {}) {
disabledDayHeader: {
color: appStyle.textSectionTitleDisabledColor
},
...(theme['stylesheet.calendar.header'] || {})
...get(theme, 'stylesheet.calendar.header', {})
});
}
3 changes: 2 additions & 1 deletion src/calendar/style.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {StyleSheet} from 'react-native';
import get from 'lodash/get';
import * as defaultStyle from '../style';
import {Theme} from '../types';

Expand All @@ -25,6 +26,6 @@ export default function getStyle(theme: Theme = {}) {
flexDirection: 'row',
justifyContent: 'space-around'
},
...(theme['stylesheet.calendar.main'] || {})
...get(theme, 'stylesheet.calendar.main', {})
});
}

0 comments on commit b78042b

Please sign in to comment.