diff --git a/CHANGELOG.txt b/CHANGELOG.txt index e02c51974ad..35d0fb514cc 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -11,6 +11,7 @@ Changelog * Allow setting default attributes on image tags (Jake Howard) * Optimise the performance of the Wagtail userbar to remove duplicated queries, improving page loads when viewing live pages while signed in (Jake Howard) * Remove legacy `unbutton` styling for buttons (Paarth Agarwal) + * Add button variations to the pattern library (Paarth Agarwal) * Fix: Prevent `PageQuerySet.not_public` from returning all pages when no page restrictions exist (Mehrdad Moradizadeh) diff --git a/docs/releases/4.1.md b/docs/releases/4.1.md index c578f13ddb0..3c689c52384 100644 --- a/docs/releases/4.1.md +++ b/docs/releases/4.1.md @@ -19,6 +19,7 @@ Wagtail 4.1 is designated a Long Term Support (LTS) release. Long Term Support r * Allow setting default attributes on image tags [](adding_default_attributes_to_images) (Jake Howard) * Optimise the performance of the Wagtail userbar to remove duplicated queries, improving page loads when viewing live pages while signed in (Jake Howard) * Remove legacy `unbutton` styling for buttons (Paarth Agarwal) + * Add button variations to the pattern library (Paarth Agarwal) ### Bug fixes diff --git a/wagtail/admin/templates/wagtailadmin/shared/button.stories.tsx b/wagtail/admin/templates/wagtailadmin/shared/button.stories.tsx new file mode 100644 index 00000000000..c7340f175c7 --- /dev/null +++ b/wagtail/admin/templates/wagtailadmin/shared/button.stories.tsx @@ -0,0 +1,207 @@ +import React from 'react'; + +export default { + title: 'Shared / Buttons', +}; + +const Template = ({ url }) => ( +
+

Buttons

+ +

Basic buttons

+ + button link + + + +

Secondary buttons

+ + button link + + + +

Small buttons

+ + button link + + + +

Secondary buttons

+ + button link + + + +

Disabled buttons

+ + button link + + + +

Bi-color icon buttons with text

+ + + + + button link + + + +

(small)

+ + + + + button link + + + +

Icon buttons without text

+ + + button link + + + +

(small)

+ + + button link + + + +

Colour signifiers

+ +

Positive

+ + yes + + + yes + + +

Negative

+ + No + + + No + + +

+ Buttons with internal loading indicators (currently only{' '} + button supported) +

+ + +

Secondary

+ + +

Small

+ + +

Buttons where the text is replaced on click

+ + + +

Mixtures

+ + + A link button + + + + + + button link + +
+); + +export const All = Template.bind({}); + +All.args = { url: window.location.toString() };