From b883bc0931779cde5c3e4e815c2005f9ce758ea7 Mon Sep 17 00:00:00 2001 From: David Newell Date: Fri, 29 Dec 2023 10:20:24 +0000 Subject: [PATCH] cleanup stories --- .../LemonButton/LemonButton.stories.tsx | 141 ++++++++---------- frontend/src/styles/utilities.scss | 4 - 2 files changed, 61 insertions(+), 84 deletions(-) diff --git a/frontend/src/lib/lemon-ui/LemonButton/LemonButton.stories.tsx b/frontend/src/lib/lemon-ui/LemonButton/LemonButton.stories.tsx index 078944d710256..37ff6c9cdbb0c 100644 --- a/frontend/src/lib/lemon-ui/LemonButton/LemonButton.stories.tsx +++ b/frontend/src/lib/lemon-ui/LemonButton/LemonButton.stories.tsx @@ -66,81 +66,19 @@ const TypesAndStatusesTemplate: StoryFn = (props) => { ) } -const ButtonVariants3000 = ({ - type = 'primary', - active = false, -}: { - type?: LemonButtonProps['type'] - active?: LemonButtonProps['active'] -}): JSX.Element => { +export const TypesAndStatuses: Story = () => { return ( -
- {statuses.map((status, index) => ( - }> - {status} - - ))} -
- ) -} - -export const Types3000: Story = () => { - return ( -
-
type=PRIMARY
-
-
- -
-
-
Active
- -
-
-
Light background
-
- -
-
+
+
+
-
type=SECONDARY
-
-
- -
-
-
Active
- -
-
-
Light background
-
- -
-
-
-
type=TERTIARY
-
-
- -
-
-
Active
- -
-
-
Light background
-
- -
-
+
+
) } -Types3000.args = { ...Default.args } -export const TypesAndStatuses: Story = TypesAndStatusesTemplate.bind({}) TypesAndStatuses.args = { ...Default.args } type PopoverStory = StoryObj @@ -230,41 +168,83 @@ export const Active = (): JSX.Element => { I am not active I am active
+
+ I am not active + + I am active + +
+
+ + I am not active + + + I am active + +
+
+ I am not active + + I am active + +
+
+ + I am not active + + + I am active + +
) } export const PseudoStates = (): JSX.Element => { return ( -
-
+
+
TYPE=3D STATE=DEFAULT
- +
TYPE=3D STATE=HOVER
- +
TYPE=3D STATE=HOVER,ACTIVE
- +
- {/*
+
+
+
TYPE=SECONDARY STATE=DEFAULT
+ +
+
+
TYPE=SECONDARY STATE=HOVER
+ +
+
+
TYPE=SECONDARY STATE=HOVER,ACTIVE
+ +
+
+
TYPE=TERTIARY STATE=DEFAULT
- +
TYPE=TERTIARY STATE=HOVER
- +
TYPE=TERTIARY STATE=HOVER,ACTIVE
- +
-
*/} +
) } @@ -278,7 +258,6 @@ PseudoStates.parameters = { export const MenuButtons = (): JSX.Element => { return (
-

When a button is used inside a menu item it should have the special status **stealth**

Active item Item 1 @@ -443,7 +422,9 @@ export const More_ = (): JSX.Element => { View Edit - Delete + + Delete + } /> diff --git a/frontend/src/styles/utilities.scss b/frontend/src/styles/utilities.scss index 71ebf539dbe6a..04d595ea54910 100644 --- a/frontend/src/styles/utilities.scss +++ b/frontend/src/styles/utilities.scss @@ -581,10 +581,6 @@ $decorations: underline, overline, line-through, no-underline; text-transform: uppercase; } -.capitalize { - text-transform: capitalize; -} - .float-right { float: right; }