Skip to content

Commit

Permalink
Merge pull request #25918 from software-mansion-labs/ts-migration/fon…
Browse files Browse the repository at this point in the history
…t-family

[No QA] [TS migration] Migrate 'fontFamily' style to TypeScript
  • Loading branch information
Gonals authored Aug 25, 2023
2 parents f3b5299 + 48a1a93 commit ae15b9e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import bold from './bold';
import FontFamilyStyles from './types';

const fontFamily = {
const fontFamily: FontFamilyStyles = {
EXP_NEUE_ITALIC: 'ExpensifyNeue-Italic',
EXP_NEUE_BOLD: bold,
EXP_NEUE: 'ExpensifyNeue-Regular',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import bold from './bold';
import FontFamilyStyles from './types';

// In windows and ubuntu, we need some extra system fonts for emojis to work properly
// otherwise few of them will appear as black and white
const fontFamily = {
const fontFamily: FontFamilyStyles = {
EXP_NEUE_ITALIC: 'ExpensifyNeue-Italic, Segoe UI Emoji, Noto Color Emoji',
EXP_NEUE_BOLD: bold,
EXP_NEUE: 'ExpensifyNeue-Regular, Segoe UI Emoji, Noto Color Emoji',
Expand Down
15 changes: 15 additions & 0 deletions src/styles/fontFamily/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
type FontFamilyKeys =
| 'EXP_NEUE_ITALIC'
| 'EXP_NEUE_BOLD'
| 'EXP_NEUE'
| 'EXP_NEW_KANSAS_MEDIUM'
| 'EXP_NEW_KANSAS_MEDIUM_ITALIC'
| 'SYSTEM'
| 'MONOSPACE'
| 'MONOSPACE_ITALIC'
| 'MONOSPACE_BOLD'
| 'MONOSPACE_BOLD_ITALIC';

type FontFamilyStyles = Record<FontFamilyKeys, string>;

export default FontFamilyStyles;

0 comments on commit ae15b9e

Please sign in to comment.