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-26 10:57:45 -0500
committerGitHub <noreply@github.com>2024-09-26 10:57:45 -0500
commit23dd638f6a730883df871e4968830067361d902b (patch)
tree8a02666605c4d7a60260ee03c4c0e32980fc16af /src/components/Button.tsx
parent1895ae2e692dab06ccafb6ad45669ba627571771 (diff)
downloadvoidsky-23dd638f6a730883df871e4968830067361d902b.tar.zst
Clean up left nav on web (#5488)
* Tweak nav item count style

* Fix nav item icon width and alignment

* Just refactor the thing

* New compose button

* Z index

* Rounded

* Tweak gradient

* Tweak gradient

* Tweak gradient

* Solid

* Adjust position of counter

* Always a circle
Diffstat (limited to 'src/components/Button.tsx')
-rw-r--r--src/components/Button.tsx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/components/Button.tsx b/src/components/Button.tsx
index 8728b88c2..17179994a 100644
--- a/src/components/Button.tsx
+++ b/src/components/Button.tsx
@@ -24,6 +24,7 @@ export type ButtonColor =
   | 'secondary'
   | 'secondary_inverted'
   | 'negative'
+  | 'gradient_primary'
   | 'gradient_sky'
   | 'gradient_midnight'
   | 'gradient_sunrise'
@@ -412,6 +413,7 @@ export const Button = React.forwardRef<View, ButtonProps>(
           secondary: tokens.gradients.sky,
           secondary_inverted: tokens.gradients.sky,
           negative: tokens.gradients.sky,
+          gradient_primary: tokens.gradients.primary,
           gradient_sky: tokens.gradients.sky,
           gradient_midnight: tokens.gradients.midnight,
           gradient_sunrise: tokens.gradients.sunrise,
@@ -444,7 +446,7 @@ export const Button = React.forwardRef<View, ButtonProps>(
       [state, variant, color, size, disabled],
     )
 
-    const flattenedBaseStyles = flatten(baseStyles)
+    const flattenedBaseStyles = flatten([baseStyles, style])
 
     return (
       <Pressable
@@ -464,7 +466,6 @@ export const Button = React.forwardRef<View, ButtonProps>(
           a.align_center,
           a.justify_center,
           flattenedBaseStyles,
-          flatten(style),
           ...(state.hovered || state.pressed
             ? [hoverStyles, flatten(hoverStyleProp)]
             : []),
@@ -626,9 +627,9 @@ export function useSharedButtonTextStyles() {
     }
 
     if (size === 'large') {
-      baseStyles.push(a.text_md, a.leading_tight, web({paddingTop: 1}))
+      baseStyles.push(a.text_md, a.leading_tight, web({top: -0.4}))
     } else if (size === 'small') {
-      baseStyles.push(a.text_sm, a.leading_tight, web({paddingTop: 1}))
+      baseStyles.push(a.text_sm, a.leading_tight, web({top: -0.4}))
     } else if (size === 'tiny') {
       baseStyles.push(a.text_xs, a.leading_tight)
     }