diff --git a/web/html/src/components/buttons.stories.tsx b/web/html/src/components/buttons.stories.tsx index fcc5d0014cf..8f54df065e9 100644 --- a/web/html/src/components/buttons.stories.tsx +++ b/web/html/src/components/buttons.stories.tsx @@ -1,7 +1,7 @@ -import { StoryRow, StripedStorySection, StorySection } from "manager/storybook/layout"; +import { StoryRow, StorySection, StripedStorySection } from "manager/storybook/layout"; import { Button } from "components/buttons"; -import { Form } from "./input/form/Form"; + import { Text } from "./input/text/Text"; import { BootstrapPanel } from "./panels/BootstrapPanel"; @@ -9,40 +9,22 @@ export default () => { const listButtons = [
Note: Icon-only buttons should always include a descriptive title
attribute or
an accessible label (via aria-labe
l or aria-labelledby
) to ensure clarity and accessibility for all users.
+ Note: Icon-only buttons should always include a descriptive title
attribute or{" "}
+
+ an accessible label (via aria-labe
l or aria-labelledby
) to ensure clarity and
+ accessibility for all users.
+
We support two button sizes: default and small. Use btn-sm
for the small button size.
+ We support two button sizes: default and small. Use btn-sm
for the small button size.
+
Make buttons look inactive by adding the disabled boolean attribute to any Button
element.
+ Make buttons look inactive by adding the disabled boolean attribute to any Button
element.
+
Every button type has a specific role. Select the appropriate button type based on the screen's context to ensure a clear and seamless user experience.
++ Every button type has a specific role. Select the appropriate button type based on the screen's context to + ensure a clear and seamless user experience. +
Primary | -Calls to action (CTAs), key actions, form submissions.
- Example: “Add”, “Create” or "Submit" + | + Primary + | +
+ Calls to action (CTAs), key actions, form submissions.
+ + Example: “Add”, “Create” or "Submit" + |
Default | -Less important actions, alternative options, supporting information and the most commonly used option.
- Example:"Edit", "Download" or "Cancel" + | + Default{" "} + | +
+ Less important actions, alternative options, supporting information and the most commonly used option.
+ + Example:"Edit", "Download" or "Cancel" + |
Danger | -Potentially irreversible actions, deletions, cancellations.
- Example: Deleting any system or data. + | + Danger{" "} + | +
+ Potentially irreversible actions, deletions, cancellations.
+ + Example: Deleting any system or data. + |
Only Icon Button | -Only icon buttons are ideal for presenting actions in compact layouts.
- Example: Table, Cards. + | + Only Icon Button{" "} + | +
+ Only icon buttons are ideal for presenting actions in compact layouts.
+ + Example: Table, Cards. + They can be used individually or grouped together. -To enhance clarity, always pair icon buttons with title attribute to give users a brief explanation of their function. ++ To enhance clarity, always pair icon buttons with title attribute to give users a brief explanation of + their function. + |
Tertiary |
- Tertiary buttons are designed for less prominent actions and should not compete visually with Primary or Default buttons. + Tertiary{" "} + |
+
+ + Tertiary buttons are designed for less prominent actions and should not compete visually with Primary or + Default buttons.{" "} + Use icon-only tertiary buttons in cards, forms, inline action or components where space is limited. -Example: Inline action buttons for editing an email address in a form. ++ Example: Inline action buttons for editing an email address in a form. + |