Design update - secondary button with icon - Wagtail Design System
See original GitHub issueGood first issue for someone confident with SCSS/CSS
Is your proposal related to a problem?
- There is not yet a officially supported button with icon that aligns with the secondary button styles (outline only button)
- If
button-secondary
is applied to the currentbicolor
button styles, it works but should align with the new official Wagtail Design System
Describe the solution you’d like
- Add support for the with icon (secondary, aka ghost) buttons as per the design system Figma
- Add new variants using
.button-secondary
withbicolor button-icon
in the styleguide https://github.com/wagtail/wagtail/blob/main/wagtail/contrib/styleguide/templates/wagtailstyleguide/base.html - Add new variants using
.button-secondary
withbicolor button-icon
in the pattern library https://github.com/wagtail/wagtail/blob/main/wagtail/admin/templates/wagtailadmin/shared/button.stories.tsx - Add styles for these variants in https://github.com/wagtail/wagtail/blob/main/client/scss/components/_button.scss
- Must work in all supported browsers https://docs.wagtail.org/en/stable/contributing/developing.html#browser-and-device-support
Normal size button-secondary with icon
Very similar to the bicolor
currently but with different colours, must support all existing supported DOM elements for buttons (a
, button
, and input[submit
).
- Default
- Hover
- Disabled
- Focus state (existing global focus outline)
Normal size button-secondary with icon
When small and secondary the border is dropped, must support all existing supported DOM elements for buttons (a
, button
, and input[submit
).
- Default
- Hover
- Disabled (not shown)
- Focus state (existing global focus outline)
Describe alternatives you’ve considered
Leave as current state and do not document .button-secondary
when used with .bicolor
.
button bicolor button--icon button-secondary |
button bicolor button--icon button-secondary button-small |
---|---|
Additional context
- The bulk of the original button designs issue was completed via https://github.com/wagtail/wagtail/issues/8790
- As this button type was not officially supported or used, it ended up being out of scope.
Issue Analytics
- State:
- Created a year ago
- Comments:13 (11 by maintainers)
Top Results From Across the Web
UX Unification - button component with variations #8790
Overview In the Wagtail design system, we have new designs for our button component. ... Small secondary button with icon
Read more >Wagtail 3.0 release notes
Implement new tabs design across the admin interface (Steven ... Further updates to the page editor are expected in the next release.
Read more >Creating and Editing Wagtail Components - CFPB
The CFPB Design System describes the design and intended usage of many of ... The icon property tells Wagtail what icon to use...
Read more >Customizing HTML/CSS in Templates — Wagtail CRX ...
For this tutorial, we will assume that you have basic knowledge of the Django templating system. You can read more about it by...
Read more >Creating a Call to Action StreamField in Wagtail ... - YouTube
In this video we'll learn how to create a brand new StreamField using a StructBlock to create a Call to Action section on...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Partial work completed - pattern library & styleguide have been updated via https://github.com/wagtail/wagtail/pull/9243
Thanks @Adinapunyo-Banerjee
Hi @lb-, I have finished working on this issue. I am kindly asking for your review and suggestions on how to improve.
Thanks a lot