Skip to content

Commit

Permalink
feat(mobile): change font to Inter (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
duongdev committed Aug 3, 2024
1 parent 4320c55 commit 634d352
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 104 deletions.
20 changes: 9 additions & 11 deletions apps/mobile/app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ import { isRunningInExpoGo } from 'expo'
import { tokenCache } from '@/lib/cache'
import { ClerkLoaded, ClerkProvider } from '@clerk/clerk-expo'
import {
BeVietnamPro_300Light,
BeVietnamPro_400Regular,
BeVietnamPro_500Medium,
BeVietnamPro_600SemiBold,
BeVietnamPro_700Bold,
Inter_200ExtraLight,
Inter_300Light,
Inter_400Regular,
Inter_500Medium,
useFonts,
} from '@expo-google-fonts/be-vietnam-pro'
} from '@expo-google-fonts/inter'
import {
SpaceMono_400Regular,
SpaceMono_700Bold,
Expand Down Expand Up @@ -105,13 +104,12 @@ function RootLayout() {
useWarmUpBrowser()
const { colorScheme } = useColorScheme()
const [fontsLoaded] = useFonts({
BeVietnamPro_300Light,
BeVietnamPro_400Regular,
BeVietnamPro_500Medium,
BeVietnamPro_600SemiBold,
BeVietnamPro_700Bold,
SpaceMono_400Regular,
SpaceMono_700Bold,
Inter_200ExtraLight,
Inter_300Light,
Inter_400Regular,
Inter_500Medium,
})
const ref = useNavigationContainerRef()

Expand Down
100 changes: 50 additions & 50 deletions apps/mobile/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,79 +3,79 @@
@tailwind utilities;

@layer base {
:root {
--background: 0 0% 100%;
--foreground: 240 6% 10%;
:root {
--background: 0 0% 100%;
--foreground: 240 6% 10%;

--muted: 210 40% 96.1%;
--muted-foreground: 240 4% 46%;
--muted: 210 40% 96.1%;
--muted-foreground: 240 4% 46%;

--popover: 0 0% 100%;
--popover-foreground: 222.2 47.4% 11.2%;
--popover: 0 0% 100%;
--popover-foreground: 222.2 47.4% 11.2%;

--input: 249 6% 90%;
--border: 249 6% 90%;
--input: 249 6% 90%;
--border: 249 6% 90%;

--card: 0 0% 100%;
--card-foreground: 222.2 47.4% 11.2%;
--card: 0 0% 100%;
--card-foreground: 222.2 47.4% 11.2%;

--primary: 240 6% 10%;
--primary-foreground: 0 0% 100%;
--primary: 240 6% 10%;
--primary-foreground: 0 0% 100%;

--secondary: 210 40% 96.1%;
--secondary-foreground: 222.2 47.4% 11.2%;
--secondary: 210 40% 96.1%;
--secondary-foreground: 222.2 47.4% 11.2%;

--accent: 210 40% 96.1%;
--accent-foreground: 222.2 47.4% 11.2%;
--accent: 210 40% 96.1%;
--accent-foreground: 222.2 47.4% 11.2%;

--destructive: 0 100% 50%;
--destructive-foreground: 210 40% 98%;
--destructive: 0 100% 50%;
--destructive-foreground: 210 40% 98%;

--ring: 215 20.2% 65.1%;
--ring: 215 20.2% 65.1%;

--radius: 0.5rem;
}
--radius: 0.5rem;
}

.dark:root {
--background: 240 10% 3.9%;
--foreground: 213 31% 91%;
.dark:root {
--background: 240 10% 3.9%;
--foreground: 213 31% 91%;

--muted: 240 3.7% 15.9%;
--muted-foreground: 240 5% 64.9%;
--muted: 240 3.7% 15.9%;
--muted-foreground: 240 5% 64.9%;

--accent: 240 3.7% 15.9%;
--accent-foreground: 0 0% 98%;
--accent: 240 3.7% 15.9%;
--accent-foreground: 0 0% 98%;

--popover: 240 10% 3.9%;
--popover-foreground: 0 0% 98%;
--popover: 240 10% 3.9%;
--popover-foreground: 0 0% 98%;

--border: 240 3.7% 15.9%;
--input: 240 3.7% 15.9%;
--border: 240 3.7% 15.9%;
--input: 240 3.7% 15.9%;

--card: 240 10% 3.9%;
--card-foreground: 213 31% 91%;
--card: 240 10% 3.9%;
--card-foreground: 213 31% 91%;

--primary: 0 0% 98%;
--primary-foreground: 240 5.9% 10%;
--primary: 0 0% 98%;
--primary-foreground: 240 5.9% 10%;

--secondary: 240 3.7% 15.9%;
--secondary-foreground: 0 0% 98%;
--secondary: 240 3.7% 15.9%;
--secondary-foreground: 0 0% 98%;

--destructive: 0 63% 31%;
--destructive-foreground: 0 0% 98%;
--destructive: 0 63% 31%;
--destructive-foreground: 0 0% 98%;

--ring: 240 3.7% 15.9%;
--ring: 240 3.7% 15.9%;

--radius: 0.5rem;
}
--radius: 0.5rem;
}
}

@layer base {
* {
@apply border-border;
}
* {
@apply border-border;
}

body {
@apply bg-background text-foreground;
}
body {
@apply bg-background text-foreground;
}
}
2 changes: 1 addition & 1 deletion apps/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@6pm/validation": "workspace:^",
"@backpackapp-io/react-native-toast": "^0.11.0",
"@clerk/clerk-expo": "^2.0.0",
"@expo-google-fonts/be-vietnam-pro": "^0.2.3",
"@expo-google-fonts/inter": "^0.2.3",
"@expo-google-fonts/space-mono": "^0.2.3",
"@expo/vector-icons": "^14.0.0",
"@formatjs/intl-locale": "^4.0.0",
Expand Down
76 changes: 38 additions & 38 deletions apps/mobile/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
const colors = require('tailwindcss/colors')
const { hairlineWidth } = require('nativewind/theme')
const colors = require("tailwindcss/colors");
const { hairlineWidth } = require("nativewind/theme");

/** @type {import('tailwindcss').Config} */
module.exports = {
darkMode: 'class',
content: ['./app/**/*.{js,jsx,ts,tsx}', './components/**/*.{js,jsx,ts,tsx}'],
presets: [require('nativewind/preset')],
darkMode: "class",
content: ["./app/**/*.{js,jsx,ts,tsx}", "./components/**/*.{js,jsx,ts,tsx}"],
presets: [require("nativewind/preset")],
theme: {
container: {
center: true,
padding: '2rem',
padding: "2rem",
screens: {
'2xl': '1400px',
"2xl": "1400px",
},
},
extend: {
fontFamily: {
sans: ['Be Vietnam Pro'],
mono: ['Space Mono'],
sans: ["Inter"],
mono: ["Space Mono"],
},
colors: {
border: 'hsl(var(--border))',
input: 'hsl(var(--input))',
ring: 'hsl(var(--ring))',
background: 'hsl(var(--background))',
foreground: 'hsl(var(--foreground))',
border: "hsl(var(--border))",
input: "hsl(var(--input))",
ring: "hsl(var(--ring))",
background: "hsl(var(--background))",
foreground: "hsl(var(--foreground))",
primary: {
DEFAULT: 'hsl(var(--primary))',
foreground: 'hsl(var(--primary-foreground))',
DEFAULT: "hsl(var(--primary))",
foreground: "hsl(var(--primary-foreground))",
},
secondary: {
DEFAULT: 'hsl(var(--secondary))',
foreground: 'hsl(var(--secondary-foreground))',
DEFAULT: "hsl(var(--secondary))",
foreground: "hsl(var(--secondary-foreground))",
},
destructive: {
DEFAULT: 'hsl(var(--destructive))',
foreground: 'hsl(var(--destructive-foreground))',
DEFAULT: "hsl(var(--destructive))",
foreground: "hsl(var(--destructive-foreground))",
},
muted: {
DEFAULT: 'hsl(var(--muted))',
foreground: 'hsl(var(--muted-foreground))',
DEFAULT: "hsl(var(--muted))",
foreground: "hsl(var(--muted-foreground))",
},
accent: {
DEFAULT: 'hsl(var(--accent))',
foreground: 'hsl(var(--accent-foreground))',
DEFAULT: "hsl(var(--accent))",
foreground: "hsl(var(--accent-foreground))",
},
popover: {
DEFAULT: 'hsl(var(--popover))',
foreground: 'hsl(var(--popover-foreground))',
DEFAULT: "hsl(var(--popover))",
foreground: "hsl(var(--popover-foreground))",
},
card: {
DEFAULT: 'hsl(var(--card))',
foreground: 'hsl(var(--card-foreground))',
DEFAULT: "hsl(var(--card))",
foreground: "hsl(var(--card-foreground))",
},
amount: {
positive: colors.green[600],
Expand All @@ -62,20 +62,20 @@ module.exports = {
hairline: hairlineWidth(),
},
keyframes: {
'accordion-down': {
from: { height: '0' },
to: { height: 'var(--radix-accordion-content-height)' },
"accordion-down": {
from: { height: "0" },
to: { height: "var(--radix-accordion-content-height)" },
},
'accordion-up': {
from: { height: 'var(--radix-accordion-content-height)' },
to: { height: '0' },
"accordion-up": {
from: { height: "var(--radix-accordion-content-height)" },
to: { height: "0" },
},
},
animation: {
'accordion-down': 'accordion-down 0.2s ease-out',
'accordion-up': 'accordion-up 0.2s ease-out',
"accordion-down": "accordion-down 0.2s ease-out",
"accordion-up": "accordion-up 0.2s ease-out",
},
},
},
plugins: [require('tailwindcss-animate')],
}
plugins: [require("tailwindcss-animate")],
};
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 634d352

Please sign in to comment.