From ea71f25012cc02d1b9bace9f4e132d125c01a7cb Mon Sep 17 00:00:00 2001 From: kyledurand Date: Tue, 7 Nov 2023 09:40:31 -0500 Subject: [PATCH 1/2] chore: clean up button stories --- .../src/components/Button/Button.stories.tsx | 368 ++++-------------- 1 file changed, 76 insertions(+), 292 deletions(-) diff --git a/polaris-react/src/components/Button/Button.stories.tsx b/polaris-react/src/components/Button/Button.stories.tsx index 2e4892808cd..6599157ac0b 100644 --- a/polaris-react/src/components/Button/Button.stories.tsx +++ b/polaris-react/src/components/Button/Button.stories.tsx @@ -11,13 +11,7 @@ import { Popover, ActionList, } from '@shopify/polaris'; -import { - PlusMinor, - DeleteMinor, - CancelSmallMinor, - EditMajor, - ChevronDownMinor, -} from '@shopify/polaris-icons'; +import {Plus, CancelSmall, Edit, ChevronDown} from '@shopify/polaris-icons'; export default { component: Button, @@ -25,265 +19,55 @@ export default { export function All() { return ( -
- - - default - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+ + Primary + + Default + + Tertiary + + Plain + + Monochrome Plain + + Destructive + + Plain Destructive + + Slim + + Micro + + Large + + Full width + + Text aligned + + Pressed + + Disclosure + + Right aligned disclosure + + Select disclosure + + Split + + Disabled state + + Loading state + + ); } export function Default() { - return ; + return ( +
+ +
+ ); } export function Plain() { @@ -294,10 +78,10 @@ export function Plain() { - - - - - - - - - - - - - - - @@ -646,7 +430,7 @@ export function RightAlignedDisclosure() { export function SelectDisclosure() { return ( -
+
@@ -661,7 +445,7 @@ export function Split() { setActive((activeId) => (activeId !== id ? id : null)); }; return ( -
+
@@ -673,7 +457,7 @@ export function Split() { -
+ <> + + + + + + + + + + + + + + + + + + + + + + + - - - - + - - + + + + + + + + + + - - - - - - ; +export function PrimarySuccess() { + return ( + + + + + + + + + + + + + - - - - - - - - + + + + + + + + + ); } @@ -446,7 +729,7 @@ export function Split() { }; return (
- + @@ -457,7 +740,7 @@ export function Split() {