Skip to content

Updates to <Calendar> styles to allow customization#66

Merged
tautvilas merged 3 commits intowix:masterfrom
kcfgl:apply-theme-fonts
Jul 13, 2017
Merged

Updates to <Calendar> styles to allow customization#66
tautvilas merged 3 commits intowix:masterfrom
kcfgl:apply-theme-fonts

Conversation

@kcfgl
Copy link
Copy Markdown
Contributor

@kcfgl kcfgl commented Jun 20, 2017

This pull request gives the ability to set appStyle props to change the fontFamily and fontSize for component.

The default "System" font and default sizes are retained and used as a backup if the props are not defined.

There likely is a more elegant way to do this and if you have any suggestions I'd be happy to make modifications.

New props

  • textDayFontFamily
  • textMonthFontFamily
  • textDayHeaderFontFamily
  • textTodayFontFamily
  • textDayFontSize
  • textMonthFontSize
  • textDayHeaderFontSize

Original
screen shot 2017-06-20 at 12 17 38 pm

With props added
screen shot 2017-06-20 at 12 16 44 pm

Copy link
Copy Markdown

@RaonyMarcondes RaonyMarcondes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🏆

@tautvilas
Copy link
Copy Markdown
Contributor

Hi, thanks for pull request. Is System font family something that is defined in the docs? Cause I can't find it.. Also plz check lint

@kcfgl
Copy link
Copy Markdown
Contributor Author

kcfgl commented Jun 23, 2017

It looks like it hasn't been properly documented but I was able to find references in some commits as well as https://github.com/facebook/react-native/blob/235b16d93287061a09c4624e612b5dc4f960ce47/React/Base/RCTConvert.m#L612

They have defined a font called "System" to be the default font for the platform.

And I'll check lint, looks like I missed something pretty simple!

@sibelius
Copy link
Copy Markdown
Contributor

System works fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants