ionic-framework icon indicating copy to clipboard operation
ionic-framework copied to clipboard

feat: add `--justify-content` variable to button component

Open craigbehnke opened this issue 1 year ago • 0 comments

Prerequisites

Describe the Feature Request

Add a css variable to pierce the button component's shadow dom and allow for custom justification of the button's contents.

Describe the Use Case

This would work well for supporting buttons in lists, where all of the existing text is aligned to one side and where the button should be full-width to support easier clicking & tapping.

Describe Preferred Solution

Add a --justify-content css variable to the button definition. This variable should be used in the span.button-inner component, with the fallback being the current behavior of 'center'.

Here's the location in code where this should be added

Describe Alternatives

The only alternative to get the desired behavior is to create a button component from scratch, which would result in having to miss out on many other features already included in the IonButton.

Related Code

No response

Additional Information

No response

craigbehnke avatar Oct 13 '24 03:10 craigbehnke