Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TextButton - add "button-display" prop #247

Closed
2 tasks done
Tracked by #452
larserbach opened this issue Jul 13, 2023 · 3 comments
Closed
2 tasks done
Tracked by #452

TextButton - add "button-display" prop #247

larserbach opened this issue Jul 13, 2023 · 3 comments
Assignees
Labels
⌨️ dev issue Task is for developers 🎓 junior issue Good for juniors

Comments

@larserbach
Copy link
Contributor

larserbach commented Jul 13, 2023

Description / User Story

As defined in the below discussion and the planning from 05.10.2023 we decided to add an option to the Text Button to make it fill their parent container.


Acceptance Criteria

  • A prop exists in the TextButton to change the width of the component to be defined by either the content or the parent container
  • When the width of the TextButton is defined by the parent container, the icon needs to be displayed with the label in the center of the button

Background information

  • It could be implemented similar to the option here under Button Display named "Block".
  • Once we have the Text Dropdown, this behaviour should also be applied there TextDropdown Button (custom) - design & build component #83
  • We discussed already the following solution:
    • The text button has a new property called "button-display" to make the component fill its parent container.
    • The icon should always be with the label in the center of the button, when the button is set to "block".
    • The current button behaviour should be the inline variant of the display prop.
@thrbnhrtmnn thrbnhrtmnn changed the title Add fix width variant for text-button & -dropdown Text-button & -dropdown - add fix width variant Aug 17, 2023
@thrbnhrtmnn thrbnhrtmnn added the 🎓 junior issue Good for juniors label Aug 18, 2023
@angelicahoyss angelicahoyss added 🚨 new::bug Something isn't working and removed 🎓 junior issue Good for juniors labels Aug 24, 2023
@thrbnhrtmnn
Copy link
Contributor

We should verify again, if this is really a dev task. If it is, we probably can also add the junior friendly label

@larserbach larserbach removed the 🚨 new::bug Something isn't working label Sep 11, 2023
@larserbach
Copy link
Contributor Author

After investigating this topic further, I believe on design side we do not have a task.
If the button shows an icon, the text must be set to hug to keep the distance between the icon and the text as defined on the gap token. Setting the textcontainer to fill, would push the icons to the far left or right of the button, which seems not desireable.

Image

Still open is the question, if we should add a "display" prop on the button as seen here: https://boltdesignsystem.com/pattern-lab/?p=viewall-elements-button

@thrbnhrtmnn thrbnhrtmnn added this to the Release 1.0 milestone Sep 29, 2023
@thrbnhrtmnn thrbnhrtmnn added the 🎓 junior issue Good for juniors label Oct 5, 2023
@thrbnhrtmnn thrbnhrtmnn changed the title Text-button & -dropdown - add fix width variant Text-button - add fix width variant Oct 5, 2023
@thrbnhrtmnn thrbnhrtmnn changed the title Text-button - add fix width variant TextButton - add fix width variant Oct 17, 2023
@thrbnhrtmnn thrbnhrtmnn changed the title TextButton - add fix width variant TextButton - add "button-display" prop Nov 9, 2023
@thrbnhrtmnn thrbnhrtmnn added the 📋 task::ready Task is ready to be picked up or planned in label Nov 9, 2023
@thrbnhrtmnn
Copy link
Contributor

Design review was done and issue was merged.

@thrbnhrtmnn thrbnhrtmnn added ⌨️ dev issue Task is for developers and removed 📋 task::ready Task is ready to be picked up or planned in labels Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⌨️ dev issue Task is for developers 🎓 junior issue Good for juniors
Projects
None yet
Development

No branches or pull requests

4 participants