Skip to content

Commit

Permalink
Add button group title (#517)
Browse files Browse the repository at this point in the history
* Add button group title

* v4.3.19
  • Loading branch information
kapantzak authored Mar 15, 2024
1 parent 22e5656 commit 3c2ad97
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@netdata/netdata-ui",
"version": "4.3.18",
"version": "4.3.19",
"description": "netdata UI kit",
"main": "dist/index.js",
"module": "dist/es6/index.js",
Expand Down
3 changes: 2 additions & 1 deletion src/components/button/buttonGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,14 @@ const Content = ({ children }) => {

const RadioButtons = ({ items, checked, buttonProps = {}, onChange }) => (
<>
{items.map(({ label, value }, index) => {
{items.map(({ label, value, title }, index) => {
const buttonGroupProps = getButtonGroupProps(index, items.length)
return (
<Button
key={value}
label={label}
onClick={() => onChange(value)}
{...(title ? { title } : {})}
{...(checked != value ? { flavour: "hollow" } : {})}
{...buttonGroupProps}
{...buttonProps}
Expand Down

0 comments on commit 3c2ad97

Please sign in to comment.