mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-21 06:15:15 +00:00
Fix font PropTypes
This commit is contained in:
@@ -44,33 +44,37 @@ function parseFontString(font) {
|
||||
|
||||
export function extractFont(props) {
|
||||
const {
|
||||
letterSpacing,
|
||||
wordSpacing,
|
||||
fontWeight,
|
||||
fontStyle,
|
||||
kerning,
|
||||
fontVariant,
|
||||
fontWeight,
|
||||
fontStretch,
|
||||
textAnchor,
|
||||
textDecoration,
|
||||
letterSpacing,
|
||||
wordSpacing,
|
||||
kerning,
|
||||
} = props;
|
||||
let {
|
||||
font,
|
||||
fontSize,
|
||||
fontFamily,
|
||||
font,
|
||||
} = props;
|
||||
|
||||
fontFamily = extractSingleFontFamily(fontFamily);
|
||||
fontSize = fontSize ? '' + fontSize : null;
|
||||
|
||||
const ownedFont = _.pickBy({
|
||||
fontFamily,
|
||||
letterSpacing,
|
||||
wordSpacing,
|
||||
fontWeight,
|
||||
fontStyle,
|
||||
fontVariant,
|
||||
fontWeight,
|
||||
fontStretch,
|
||||
fontSize,
|
||||
kerning,
|
||||
fontFamily,
|
||||
textAnchor,
|
||||
textDecoration,
|
||||
letterSpacing,
|
||||
wordSpacing,
|
||||
kerning,
|
||||
}, prop => !_.isNil(prop));
|
||||
|
||||
if (typeof font === 'string') {
|
||||
|
||||
Reference in New Issue
Block a user