darrylsyms / fretwise-app-private

0 stars 0 forks source link

Lesson/Topic ActionButton Text weight inconsistency #18

Closed darrylsyms closed 2 years ago

darrylsyms commented 2 years ago

The code logic inside the Lesson/Topic Action Buttons is very strange and inconsistently written.

Both of the following styles are for the "Completed" text in lesson/topic action buttons. However they both have different styling, and I've not found it possible to fix them via custom code...

So despite both of these styles representing the same component, they both have different font weights.

The following code kinda fixes the problem on iOS, but not Android: externalCodeSetup.cssApi.addGlobalStyle("completeTopicButton", { fontWeight: '600', });


It's odd how I need two styling hooks in lessons, and only one in topics, to achieve the same thing..

Lessons

externalCodeSetup.cssApi.addGlobalStyle("completeLessonButton", { marginLeft: 0, });
externalCodeSetup.cssApi.addGlobalStyle("completeButton", {  marginBottom: Platform.OS === 'ios' ? 15 : 0 });

Topics

externalCodeSetup.cssApi.addGlobalStyle("completeTopicButton", { marginBottom: Platform.OS === 'ios' ? 15 : 0, fontWeight: '600', });
darrylsyms commented 2 years ago

Can now change both the CSS of the buttons, and utilise hooks to completely override the buttons 👌