RFC: Add support for split buttons#427
Conversation
|
Wow, it's very promising!
|
|
Thanks - yeah this is still quite early so I wanted to share to get your opinion on the direction before committing to much. Using a variable for the divider is a cool idea, I had been trying to use
That was my preference too, updated.
With regards to prettier, it seems to be making changes which are inconsistent with what already exists, eg adding spaces to imports and changing single quotes to double quotes? I am happy to submit that but it seems odd? |
|
Seems like the VS Code prettier extension on github.dev doesn't work for some reason. Checked out locally and run to fix. |
|
I've merged in your proposed changes |
|
Thanks! Merged. |


Fixes #168.
This is still in draft as there are a few things I am not sure on.
This is what the buttons look like after this change. (Regular text buttons or text buttons with icons are unchanged)
And the html for that:
This is what I think will be the most common usage of the split button. It includes a standard button, a divider and a chevron down. Both sides are standard buttons, the split button trims the border radius and border of the relevant slotted children.
This is a demo of 3 buttons combined into a group.
I am unsure what I think about the square icon in the first example - it makes sense in all other examples but looks weird here.
This is an example of how the buttons look without a divider. I am not sure if there is a use case for this, but I guess there is no harm in having the option.
You can split primary and seconday buttons, although the background of the separator must be one or the other.
These last two just demonstrate some icon buttons with no slotted content, showing the new padding for these.