Skip to content

Commit

Permalink
Merge pull request #275 from Gympass/ENJ-127
Browse files Browse the repository at this point in the history
Fix Android font weight issue
  • Loading branch information
thiagogympass authored Jun 23, 2021
2 parents 8ea4d82 + a7ce28b commit 4c8ffa2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/yoga/src/Text/native/Text.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import styled from 'styled-components';
import { oneOf, bool } from 'prop-types';
import textStyle from '../sharedTextStyle';
import textStyle from '../textStyle';

const styledText = type => styled.Text`
${textStyle(type)}
Expand Down
9 changes: 6 additions & 3 deletions packages/yoga/src/Text/textStyle.android.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { css } from 'styled-components';
import defaultStyle from './textStyle';
import defaultStyle from './sharedTextStyle';

const textStyle = type => () => css`
${defaultStyle(type)};
Expand All @@ -17,8 +17,11 @@ const textStyle = type => () => css`
},
},
}) => `
${fontWeight !== 400 ? `-${fontWeight}` : ''};
${light ? `font-family: ${baseFont.family}-${fontWeights.light};` : ''}
font-family: ${
fontWeight === 400 ? baseFont.family : `${baseFont.family}-${fontWeight}`
};
${light ? `font-family: ${baseFont.family}-${fontWeights.light};` : ''}
`}
`;

Expand Down
File renamed without changes.

0 comments on commit 4c8ffa2

Please sign in to comment.