From fff3e918ffaa6c78cdef5979ba1b147fda320bf7 Mon Sep 17 00:00:00 2001 From: Vince Picone Date: Mon, 27 Jul 2020 19:13:50 -0500 Subject: [PATCH] fix: useFonts default map --- .../src/components/Button.tsx | 2 +- .../src/components/Text/index.tsx | 2 +- .../components-react-native/src/util/useFonts.tsx | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/components-react-native/src/components/Button.tsx b/packages/components-react-native/src/components/Button.tsx index 42e6d60..87d5ae7 100644 --- a/packages/components-react-native/src/components/Button.tsx +++ b/packages/components-react-native/src/components/Button.tsx @@ -101,7 +101,7 @@ const styles = StyleSheet.create({ paddingRight: 64, }, title: { - fontFamily: 'IBMPlexSans_Regular', + fontFamily: 'IBMPlexSans', color: theme.text04, fontSize: Platform.select({ android: 16, diff --git a/packages/components-react-native/src/components/Text/index.tsx b/packages/components-react-native/src/components/Text/index.tsx index 7ab8d73..79f8915 100644 --- a/packages/components-react-native/src/components/Text/index.tsx +++ b/packages/components-react-native/src/components/Text/index.tsx @@ -35,7 +35,7 @@ const Text: React.FC = ({ children, kind = 'p1', ...rest }) => { const styles = StyleSheet.create({ text: { - fontFamily: 'IBMPlexSans-Regular', + fontFamily: 'IBMPlexSans', }, h1: { fontSize: 14, diff --git a/packages/components-react-native/src/util/useFonts.tsx b/packages/components-react-native/src/util/useFonts.tsx index 8acf938..6fc3731 100644 --- a/packages/components-react-native/src/util/useFonts.tsx +++ b/packages/components-react-native/src/util/useFonts.tsx @@ -3,15 +3,15 @@ import { useEffect, useState } from 'react'; import { loadAsync } from 'expo-font'; import { default as IBMPlexSans_Light } from '@vpicone/components-react-native/assets/plex/IBMPlexSans-Light.ttf'; -import { default as IBMPlexMono_Regular } from '@vpicone/components-react-native/assets/plex/IBMPlexMono-Regular.ttf'; -import { default as IBMPlexSans_Regular } from '@vpicone/components-react-native/assets/plex/IBMPlexSans-Regular.ttf'; +import { default as IBMPlexMono } from '@vpicone/components-react-native/assets/plex/IBMPlexMono-Regular.ttf'; +import { default as IBMPlexSans } from '@vpicone/components-react-native/assets/plex/IBMPlexSans-Regular.ttf'; import { default as IBMPlexSans_SemiBold } from '@vpicone/components-react-native/assets/plex/IBMPlexSans-SemiBold.ttf'; export const defaultMap = { - IBMPlexSans_Light, - IBMPlexMono: IBMPlexMono_Regular, - IBMPlexSans: IBMPlexSans_Regular, - IBMPlexSans_SemiBold, + IBMPlexMono, + IBMPlexSans, + 'IBMPlexSans-Light': IBMPlexSans_Light, + 'IBMPlexSans-SemiBold': IBMPlexSans_SemiBold, 'CarbonIcons-Core': require('@vpicone/icons-react-native/assets/icons/CarbonIcons-Core.ttf'), };