Skip to content

Commit

Permalink
feat(ui): add font-family for each component that has text
Browse files Browse the repository at this point in the history
  • Loading branch information
artyorsh committed Sep 26, 2019
1 parent 5468776 commit aa11e1c
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ export class BottomNavigationTabComponent extends React.Component<BottomNavigati
iconMarginVertical,
iconTintColor,
textMarginVertical,
textFontFamily,
textFontSize,
textLineHeight,
textFontWeight,
Expand All @@ -154,6 +155,7 @@ export class BottomNavigationTabComponent extends React.Component<BottomNavigati
container: containerParameters,
text: {
marginVertical: textMarginVertical,
fontFamily: textFontFamily,
fontSize: textFontSize,
lineHeight: textLineHeight,
fontWeight: textFontWeight,
Expand Down
2 changes: 2 additions & 0 deletions src/framework/ui/button/button.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ export class ButtonComponent extends React.Component<ButtonProps> {
private getComponentStyle = (source: StyleType): StyleType => {
const {
textColor,
textFontFamily,
textFontSize,
textLineHeight,
textFontWeight,
Expand All @@ -203,6 +204,7 @@ export class ButtonComponent extends React.Component<ButtonProps> {
container: containerParameters,
text: {
color: textColor,
fontFamily: textFontFamily,
fontSize: textFontSize,
lineHeight: textLineHeight,
fontWeight: textFontWeight,
Expand Down
6 changes: 4 additions & 2 deletions src/framework/ui/checkbox/checkbox.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,11 @@ class CheckBoxComponent extends React.Component<CheckBoxProps> {
private getComponentStyle = (source: StyleType): StyleType => {
const {
textMarginHorizontal,
textColor,
textFontFamily,
textFontSize,
textFontWeight,
textLineHeight,
textColor,
iconWidth,
iconHeight,
iconBorderRadius,
Expand All @@ -335,10 +336,11 @@ class CheckBoxComponent extends React.Component<CheckBoxProps> {
selectContainer: containerParameters,
text: {
marginHorizontal: textMarginHorizontal,
color: textColor,
fontFamily: textFontFamily,
fontSize: textFontSize,
fontWeight: textFontWeight,
lineHeight: textLineHeight,
color: textColor,
},
icon: {
width: iconWidth,
Expand Down
2 changes: 2 additions & 0 deletions src/framework/ui/input/input.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ export class InputComponent extends React.Component<InputProps> {

const {
textMarginHorizontal,
textFontFamily,
textFontSize,
textLineHeight,
textFontWeight,
Expand Down Expand Up @@ -407,6 +408,7 @@ export class InputComponent extends React.Component<InputProps> {
},
text: {
marginHorizontal: textMarginHorizontal,
fontFamily: textFontFamily,
fontSize: textFontSize,
// FIXME: RN issue (https://github.com/facebook/react-native/issues/7823)
// lineHeight: textLineHeight,
Expand Down
4 changes: 4 additions & 0 deletions src/framework/ui/list/listItem.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,12 @@ export class ListItemComponent extends React.Component<ListItemProps> {
iconMarginHorizontal,
iconTintColor,
titleMarginHorizontal,
titleFontFamily,
titleFontSize,
titleLineHeight,
titleFontWeight,
titleColor,
descriptionFontFamily,
descriptionFontSize,
descriptionFontWeight,
descriptionLineHeight,
Expand All @@ -242,13 +244,15 @@ export class ListItemComponent extends React.Component<ListItemProps> {
},
title: {
marginHorizontal: titleMarginHorizontal,
fontFamily: titleFontFamily,
fontSize: titleFontSize,
lineHeight: titleLineHeight,
fontWeight: titleFontWeight,
color: titleColor,
},
description: {
color: descriptionColor,
fontFamily: descriptionFontFamily,
fontSize: descriptionFontSize,
fontWeight: descriptionFontWeight,
lineHeight: descriptionLineHeight,
Expand Down
1 change: 1 addition & 0 deletions src/framework/ui/menu/menuItem.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ class MenuItemComponent extends React.Component<MenuItemProps> {
},
title: {
marginHorizontal: titleStyles.titleMarginHorizontal,
fontFamily: titleStyles.titleFontFamily,
fontSize: titleStyles.titleFontSize,
fontWeight: titleStyles.titleFontWeight,
lineHeight: titleStyles.titleLineHeight,
Expand Down
2 changes: 2 additions & 0 deletions src/framework/ui/radio/radio.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ export class RadioComponent extends React.Component<RadioProps> {
private getComponentStyle = (source: StyleType): StyleType => {
const {
textMarginHorizontal,
textFontFamily,
textFontSize,
textFontWeight,
textLineHeight,
Expand All @@ -218,6 +219,7 @@ export class RadioComponent extends React.Component<RadioProps> {
selectContainer: containerParameters,
text: {
marginHorizontal: textMarginHorizontal,
fontFamily: textFontFamily,
fontSize: textFontSize,
lineHeight: textLineHeight,
fontWeight: textFontWeight,
Expand Down
2 changes: 2 additions & 0 deletions src/framework/ui/select/select.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -579,13 +579,15 @@ class SelectComponent extends React.Component<SelectProps, State> {
},
text: {
color: textStyles.textColor,
fontFamily: textStyles.textFontFamily,
fontSize: textStyles.textFontSize,
fontWeight: textStyles.textFontWeight,
lineHeight: textStyles.textLineHeight,
marginHorizontal: textStyles.textMarginHorizontal,
},
placeholder: {
color: placeholderStyles.placeholderColor,
fontFamily: placeholderStyles.placeholderFontFamily,
fontSize: placeholderStyles.placeholderFontSize,
fontWeight: placeholderStyles.placeholderFontWeight,
lineHeight: placeholderStyles.placeholderLineHeight,
Expand Down
3 changes: 3 additions & 0 deletions src/framework/ui/select/selectOption.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ class SelectOptionComponent extends React.Component<SelectOptionProps> {
private getComponentStyle = (source: StyleType): StyleType => {
const {
textColor,
textFontFamily,
textFontSize,
textFontWeight,
textLineHeight,
Expand All @@ -105,13 +106,15 @@ class SelectOptionComponent extends React.Component<SelectOptionProps> {
},
text: {
color: textColor,
fontFamily: textFontFamily,
fontSize: textFontSize,
fontWeight: textFontWeight,
lineHeight: textLineHeight,
marginHorizontal: textMarginHorizontal,
},
multiSelectText: {
color: multiSelectTextColor,
fontFamily: textFontFamily,
fontSize: textFontSize,
fontWeight: textFontWeight,
lineHeight: textLineHeight,
Expand Down
2 changes: 2 additions & 0 deletions src/framework/ui/tab/tab.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ export class TabComponent extends React.Component<TabProps> {
private getComponentStyle = (source: StyleType): StyleType => {
const {
textMarginVertical,
textFontFamily,
textFontSize,
textLineHeight,
textFontWeight,
Expand All @@ -168,6 +169,7 @@ export class TabComponent extends React.Component<TabProps> {
},
title: {
marginVertical: textMarginVertical,
fontFamily: textFontFamily,
fontSize: textFontSize,
lineHeight: textLineHeight,
fontWeight: textFontWeight,
Expand Down
2 changes: 2 additions & 0 deletions src/framework/ui/tooltip/tooltip.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ export class TooltipComponent extends React.Component<TooltipProps> {
iconTintColor,
textMarginHorizontal,
textFontSize,
textFontFamily,
textLineHeight,
textColor,
...containerParameters
Expand All @@ -254,6 +255,7 @@ export class TooltipComponent extends React.Component<TooltipProps> {
},
text: {
marginHorizontal: textMarginHorizontal,
fontFamily: textFontFamily,
fontSize: textFontSize,
lineHeight: textLineHeight,
color: textColor,
Expand Down
4 changes: 4 additions & 0 deletions src/framework/ui/topNavigation/topNavigation.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,13 @@ export class TopNavigationComponent extends React.Component<TopNavigationProps>
private getComponentStyle = (source: StyleType): StyleType => {
const {
titleTextAlign,
titleFontFamily,
titleFontSize,
titleLineHeight,
titleFontWeight,
titleColor,
subtitleTextAlign,
subtitleFontFamily,
subtitleFontSize,
subtitleLineHeight,
subtitleFontWeight,
Expand All @@ -207,13 +209,15 @@ export class TopNavigationComponent extends React.Component<TopNavigationProps>
titleContainer: {},
title: {
textAlign: titleTextAlign,
fontFamily: titleFontFamily,
fontSize: titleFontSize,
lineHeight: titleLineHeight,
fontWeight: titleFontWeight,
color: titleColor,
},
subtitle: {
textAlign: subtitleTextAlign,
fontFamily: subtitleFontFamily,
fontSize: subtitleFontSize,
color: subtitleColor,
fontWeight: subtitleFontWeight,
Expand Down

0 comments on commit aa11e1c

Please sign in to comment.