diff --git a/src/agenda/reservation-list/style.ts b/src/agenda/reservation-list/style.ts index b0b6505f85..366faafe16 100644 --- a/src/agenda/reservation-list/style.ts +++ b/src/agenda/reservation-list/style.ts @@ -37,6 +37,6 @@ export default function styleConstructor(theme: Theme = {}) { indicator: { marginTop: 80 }, - ...(theme['stylesheet.agenda.list'] || {}) + ...(theme.stylesheet?.agenda?.list ?? {}) }); } diff --git a/src/agenda/style.ts b/src/agenda/style.ts index 60176e3975..321a26493b 100644 --- a/src/agenda/style.ts +++ b/src/agenda/style.ts @@ -52,6 +52,6 @@ export default function styleConstructor(theme: Theme = {}) { width: '100%', alignSelf: 'center' }, - ...(theme['stylesheet.agenda.main'] || {}) + ...(theme.stylesheet?.agenda?.main ?? {}) }); } diff --git a/src/calendar-list/style.ts b/src/calendar-list/style.ts index 7bba2a5e9d..29233ce3e6 100644 --- a/src/calendar-list/style.ts +++ b/src/calendar-list/style.ts @@ -33,6 +33,6 @@ export default function getStyle(theme: Theme = {}) { backgroundColor: appStyle.calendarBackground, paddingHorizontal: 15 }, - ...(theme['stylesheet.calendar-list.main'] || {}) + ...(theme.stylesheet?.['calendar-list']?.main ?? {}) }); } diff --git a/src/calendar/day/basic/style.ts b/src/calendar/day/basic/style.ts index f0350e4355..d8bc2ebb48 100644 --- a/src/calendar/day/basic/style.ts +++ b/src/calendar/day/basic/style.ts @@ -45,7 +45,6 @@ export default function styleConstructor(theme: Theme = {}) { inactiveText: { color: appStyle.textInactiveColor }, - - ...(theme['stylesheet.day.basic'] || {}) + ...(theme.stylesheet?.day?.basic ?? {}) }); } diff --git a/src/calendar/day/dot/style.ts b/src/calendar/day/dot/style.ts index 057c0b841e..eeafeddc85 100644 --- a/src/calendar/day/dot/style.ts +++ b/src/calendar/day/dot/style.ts @@ -30,6 +30,6 @@ export default function styleConstructor(theme: Theme = {}) { todayDot: { backgroundColor: appStyle.todayDotColor }, - ...(theme['stylesheet.dot'] || {}) + ...(theme.stylesheet?.dot ?? {}) }); } diff --git a/src/calendar/day/marking/style.ts b/src/calendar/day/marking/style.ts index 1feba83dd0..7f30cc6005 100644 --- a/src/calendar/day/marking/style.ts +++ b/src/calendar/day/marking/style.ts @@ -26,6 +26,6 @@ export default function styleConstructor(theme: Theme = {}) { borderBottomRightRadius: 2, marginRight: 4 }, - ...(theme['stylesheet.marking'] || {}) + ...(theme.stylesheet?.marking ?? {}) }); } diff --git a/src/calendar/day/period/style.ts b/src/calendar/day/period/style.ts index ec68c762fa..31bcc4ecba 100644 --- a/src/calendar/day/period/style.ts +++ b/src/calendar/day/period/style.ts @@ -60,7 +60,6 @@ export default function styleConstructor(theme: Theme = {}) { inactiveText: { color: appStyle.textInactiveColor }, - - ...(theme['stylesheet.day.period'] || {}) + ...(theme.stylesheet?.day?.period ?? {}) }); } diff --git a/src/calendar/header/style.ts b/src/calendar/header/style.ts index cf6d36c23c..5078e5b657 100644 --- a/src/calendar/header/style.ts +++ b/src/calendar/header/style.ts @@ -68,6 +68,6 @@ export default function (theme: Theme = {}) { disabledDayHeader: { color: appStyle.textSectionTitleDisabledColor }, - ...(theme['stylesheet.calendar.header'] || {}) + ...(theme.stylesheet?.calendar?.header ?? {}) }); } diff --git a/src/calendar/style.ts b/src/calendar/style.ts index 69ffb04567..11cc16970b 100644 --- a/src/calendar/style.ts +++ b/src/calendar/style.ts @@ -25,6 +25,6 @@ export default function getStyle(theme: Theme = {}) { flexDirection: 'row', justifyContent: 'space-around' }, - ...(theme['stylesheet.calendar.main'] || {}) + ...(theme.stylesheet?.calendar?.main ?? {}) }); } diff --git a/src/expandableCalendar/style.ts b/src/expandableCalendar/style.ts index ff8b3cb582..0794999261 100644 --- a/src/expandableCalendar/style.ts +++ b/src/expandableCalendar/style.ts @@ -171,6 +171,6 @@ export default function styleConstructor(theme: Theme = {}) { marginLeft: appStyle.todayButtonPosition === 'right' ? 7 : undefined, marginRight: appStyle.todayButtonPosition === 'right' ? undefined : 7 }, - ...(theme?.stylesheet?.expandable?.main || {}) + ...(theme.stylesheet?.expandable?.main ?? {}) }); }