Skip to content

Commit

Permalink
fix: correct web font (#3210)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukewalczak committed Jun 15, 2022
1 parent f63efd2 commit 91cb88a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 7 additions & 2 deletions example/src/Examples/CardExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
} from 'react-native-paper';
import { PreferencesContext } from '..';
import ScreenWrapper from '../ScreenWrapper';
import { isWeb } from '../../utils';

type Mode = 'elevated' | 'outlined' | 'contained';

Expand Down Expand Up @@ -121,7 +122,9 @@ const CardExample = () => {
<Card
style={styles.card}
onPress={() => {
Alert.alert('The Chameleon is Pressed');
isWeb
? alert('The Chameleon is Pressed')
: Alert.alert('The Chameleon is Pressed');
}}
mode={selectedMode}
>
Expand All @@ -136,7 +139,9 @@ const CardExample = () => {
<Card
style={styles.card}
onLongPress={() => {
Alert.alert('The City is Long Pressed');
isWeb
? alert('The City is Long Pressed')
: Alert.alert('The City is Long Pressed');
}}
mode={selectedMode}
>
Expand Down
2 changes: 2 additions & 0 deletions src/styles/themes/v3/tokens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,14 @@ const ref = {

typeface: {
brandRegular: Platform.select({
web: 'Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif',
ios: 'System',
default: 'sans-serif',
}),
weightRegular: '400' as Font['fontWeight'],

plainMedium: Platform.select({
web: 'Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif',
ios: 'System',
default: 'sans-serif-medium',
}),
Expand Down

0 comments on commit 91cb88a

Please sign in to comment.