import * as React from 'react'
import cx from 'classnames'

import './style.scss'

export interface ButtonGroupComponentProps extends React.PropsWithChildren {
	className?: string
}

/**
 * `wp.components.ButtonGroup` was deprecated - this replaces it.
 * It used to be `.components-button-group`, now it's `.ska-button-group__group`.
 */
const ButtonGroupComponent: React.FC<ButtonGroupComponentProps> = ({children, className, ...props}) => {
	return (
		<div
			role='group'
			{...props}
			className={cx('ska-button-group__group', className)}
		>
			{children}
		</div>
	)
}

export default ButtonGroupComponent
