about summary refs log tree commit diff
path: root/src/components/Button.tsx
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2024-09-18 19:35:34 -0500
committerGitHub <noreply@github.com>2024-09-18 19:35:34 -0500
commitcbc7cd080889bbb8af052717d2831880ccd10475 (patch)
tree4dcd92ad101e00701479d31611735214852d32a6 /src/components/Button.tsx
parentfb3be7982024aed4cf141fbe3f658d8d6b0f94f5 (diff)
downloadvoidsky-cbc7cd080889bbb8af052717d2831880ccd10475.tar.zst
[Neue] Base (#5395)
* Add fontScale, gate it, fix some computes

* Add inter, integrate

* Clean up

* Apply to old Text component

* Use numeric weight

* Cleanup

* Clean up appearance settings

* Global tracking

* Fix regular italic variant

* Refactor settings and fontScale values

* Remove flags

* Get rid of lower weight font usage

* Remove gate from settings

* Refactor appearance settings for reuse

* Add neue type nux

* Update defaults

* Load fonts, add fallback families

* Load fonts via plugin in production

* Fixes

* Fix for web

* Nits

---------

Co-authored-by: Hailey <me@haileyok.com>
Diffstat (limited to 'src/components/Button.tsx')
-rw-r--r--src/components/Button.tsx12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/components/Button.tsx b/src/components/Button.tsx
index d65444e1f..704aa9d98 100644
--- a/src/components/Button.tsx
+++ b/src/components/Button.tsx
@@ -7,7 +7,6 @@ import {
   PressableProps,
   StyleProp,
   StyleSheet,
-  Text,
   TextProps,
   TextStyle,
   View,
@@ -17,7 +16,7 @@ import {LinearGradient} from 'expo-linear-gradient'
 
 import {android, atoms as a, flatten, select, tokens, useTheme} from '#/alf'
 import {Props as SVGIconProps} from '#/components/icons/common'
-import {normalizeTextStyles} from '#/components/Typography'
+import {Text} from '#/components/Typography'
 
 export type ButtonVariant = 'solid' | 'outline' | 'ghost' | 'gradient'
 export type ButtonColor =
@@ -635,14 +634,7 @@ export function ButtonText({children, style, ...rest}: ButtonTextProps) {
   const textStyles = useSharedButtonTextStyles()
 
   return (
-    <Text
-      {...rest}
-      style={normalizeTextStyles([
-        a.font_bold,
-        a.text_center,
-        textStyles,
-        style,
-      ])}>
+    <Text {...rest} style={[a.font_bold, a.text_center, textStyles, style]}>
       {children}
     </Text>
   )