palantir / blueprint

A React-based UI toolkit for the web
https://blueprintjs.com/
Apache License 2.0
20.64k stars 2.17k forks source link

FR: ButtonGroup should support "outlined" prop modifier #4425

Open DannyDelott opened 3 years ago

DannyDelott commented 3 years ago

Environment

Background

The ButtonGroup component renders a small amount of margin between the buttons whenever you use outlined buttons in Dark mode.

It looks like this behavior has existed since the outlined prop was introduced in @blueprintjs/core@3.24.0

image

Code Sandbox

https://codesandbox.io/s/green-sun-tmzq9?file=/src/App.js

Expected behavior

The ButtonGroup should render w/out any margin between buttons (see non-dark mode equivalent)

Possible solution

adidahiya commented 3 years ago

Thanks for pointing this out. ButtonGroup doesn't have outlined support yet; we need to add styling at the group container level just like minimal. It wouldn't make sense to have some buttons in a group outlined while others are not, so the prop & CSS class should be applied to the ButtonGroup.