diff options
author | Samuel Newman <mozzius@protonmail.com> | 2025-08-12 02:04:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-11 18:04:45 -0500 |
commit | ef171e289234c7439011b68a61e951ab88319d0b (patch) | |
tree | d08f56f3edc18156fbf1c9c2c8dd20ce944f258d /src/alf | |
parent | 17c5cec3566c591dd3aa1a939d449d8206f91c28 (diff) | |
download | voidsky-ef171e289234c7439011b68a61e951ab88319d0b.tar.zst |
Tweak small buttons (#8818)
* set size=small buttons to `text_sm` * change to `leading_snug` * add gap to repost buttons * Add medium-weight font, use for buttons (#8819) * add medium weight inter * add medium font to buttons * Adjust bold weights * Fix ref --------- Co-authored-by: Eric Bailey <git@esb.lol> * Align with designs --------- Co-authored-by: Eric Bailey <git@esb.lol>
Diffstat (limited to 'src/alf')
-rw-r--r-- | src/alf/atoms.ts | 3 | ||||
-rw-r--r-- | src/alf/fonts.ts | 12 | ||||
-rw-r--r-- | src/alf/tokens.ts | 1 | ||||
-rw-r--r-- | src/alf/util/unusedUseFonts.android.ts | 10 |
4 files changed, 16 insertions, 10 deletions
diff --git a/src/alf/atoms.ts b/src/alf/atoms.ts index fe449c6ee..5b7c5c87e 100644 --- a/src/alf/atoms.ts +++ b/src/alf/atoms.ts @@ -332,6 +332,9 @@ export const atoms = { font_normal: { fontWeight: tokens.fontWeight.normal, }, + font_medium: { + fontWeight: tokens.fontWeight.medium, + }, font_bold: { fontWeight: tokens.fontWeight.bold, }, diff --git a/src/alf/fonts.ts b/src/alf/fonts.ts index 786916721..7366edef2 100644 --- a/src/alf/fonts.ts +++ b/src/alf/fonts.ts @@ -1,7 +1,7 @@ -import {TextStyle} from 'react-native' +import {type TextStyle} from 'react-native' import {isAndroid, isWeb} from '#/platform/detection' -import {Device, device} from '#/storage' +import {type Device, device} from '#/storage' const WEB_FONT_FAMILIES = `system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"` @@ -43,11 +43,11 @@ export function applyFonts(style: TextStyle, fontFamily: 'system' | 'theme') { style.fontFamily = { 400: 'Inter-Regular', - 500: 'Inter-Regular', + 500: 'Inter-Medium', 600: 'Inter-SemiBold', - 700: 'Inter-SemiBold', - 800: 'Inter-ExtraBold', - 900: 'Inter-ExtraBold', + 700: 'Inter-Bold', + 800: 'Inter-Bold', + 900: 'Inter-Bold', }[String(style.fontWeight || '400')] || 'Inter-Regular' if (style.fontStyle === 'italic') { diff --git a/src/alf/tokens.ts b/src/alf/tokens.ts index 576aafe95..74cc160fc 100644 --- a/src/alf/tokens.ts +++ b/src/alf/tokens.ts @@ -53,6 +53,7 @@ export const borderRadius = { */ export const fontWeight = { normal: '400', + medium: '500', bold: '600', heavy: '800', } as const diff --git a/src/alf/util/unusedUseFonts.android.ts b/src/alf/util/unusedUseFonts.android.ts index 083c9d4d6..467f3909f 100644 --- a/src/alf/util/unusedUseFonts.android.ts +++ b/src/alf/util/unusedUseFonts.android.ts @@ -11,9 +11,11 @@ export function DO_NOT_USE() { return useFonts({ 'Inter-Regular': require('../../../assets/fonts/inter/Inter-Regular.otf'), 'Inter-Italic': require('../../../assets/fonts/inter/Inter-Italic.otf'), - 'Inter-Bold': require('../../../assets/fonts/inter/Inter-SemiBold.otf'), - 'Inter-BoldItalic': require('../../../assets/fonts/inter/Inter-SemiBoldItalic.otf'), - 'Inter-Black': require('../../../assets/fonts/inter/Inter-ExtraBold.otf'), - 'Inter-BlackItalic': require('../../../assets/fonts/inter/Inter-ExtraBoldItalic.otf'), + 'Inter-Medium': require('../../../assets/fonts/inter/Inter-Medium.otf'), + 'Inter-MediumItalic': require('../../../assets/fonts/inter/Inter-MediumItalic.otf'), + 'Inter-SemiBold': require('../../../assets/fonts/inter/Inter-SemiBold.otf'), + 'Inter-SemiBoldItalic': require('../../../assets/fonts/inter/Inter-SemiBoldItalic.otf'), + 'Inter-Bold': require('../../../assets/fonts/inter/Inter-Bold.otf'), + 'Inter-BoldItalic': require('../../../assets/fonts/inter/Inter-BoldItalic.otf'), }) } |