From cb54082edab73fd8e7f736e5b883b87e052604a8 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Thu, 7 Aug 2025 11:08:31 -0500 Subject: [APP-1310] Button refresh (#8758) * Rm gradient buttons from Storybook * TEMP move storybook button section * Remove gradient_sky * Remove actual defs for gradient_sky and gradient_primary * Remove other gradient defs * Remove gradient support entirely * Deprecate 'variant' in favor of 'color' * Fork base styles codepath to make variant deprecation more obvious * Remove text styles for when no color is set, never been used * Fork text styles codepath to make variant deprecation more obvious * Revert temp storybook commit, remove deprecated values * Replace remaining gradient button usage * Update Buttons storybook section * Update tiny styles * Update small styles * Update large sizes * Ensure proper alignment of buttons in storybook * Update button colors * Rename negative_secondary to negative_subtle * Remove unnecessary select() * Update icon size and gap * Update negative_subtle styles * Custom button colors * Add borderCurve --- src/view/screens/Storybook/Buttons.tsx | 212 +++++++++++---------------------- src/view/screens/Storybook/index.tsx | 2 +- 2 files changed, 69 insertions(+), 145 deletions(-) (limited to 'src/view') diff --git a/src/view/screens/Storybook/Buttons.tsx b/src/view/screens/Storybook/Buttons.tsx index eaf8bba7e..0db062913 100644 --- a/src/view/screens/Storybook/Buttons.tsx +++ b/src/view/screens/Storybook/Buttons.tsx @@ -1,3 +1,4 @@ +import {Fragment} from 'react' import {View} from 'react-native' import {atoms as a} from '#/alf' @@ -5,159 +6,82 @@ import { Button, type ButtonColor, ButtonIcon, + type ButtonSize, ButtonText, } from '#/components/Button' import {ChevronLeft_Stroke2_Corner0_Rounded as ChevronLeft} from '#/components/icons/Chevron' import {Globe_Stroke2_Corner0_Rounded as Globe} from '#/components/icons/Globe' -import {H1} from '#/components/Typography' +import {Text} from '#/components/Typography' export function Buttons() { return ( -

Buttons

+ Buttons - - {[ - 'primary', - 'secondary', - 'secondary_inverted', - 'negative', - 'negative_secondary', - ].map(color => ( - - - - - ))} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + {[ + 'primary', + 'secondary', + 'secondary_inverted', + 'negative', + 'primary_subtle', + 'negative_subtle', + ].map(color => ( + + {['tiny', 'small', 'large'].map(size => ( + + + color={color} size={size} + + + + + + + + + + + + + ))} + + ))}
) } diff --git a/src/view/screens/Storybook/index.tsx b/src/view/screens/Storybook/index.tsx index 1151d5a3c..8285b0d73 100644 --- a/src/view/screens/Storybook/index.tsx +++ b/src/view/screens/Storybook/index.tsx @@ -87,6 +87,7 @@ function StorybookInner() { +