Title: ButtonGroup component lacks customization options for background and border colors
Description:
The ButtonGroup component in Petal Components 2.0 has hardcoded background and border color styles in the group_btn_base_class function. This makes it difficult to customize the appearance of the buttons to match different design requirements without resorting to CSS overrides or creating custom components.
Current behavior:
The ButtonGroup component applies the following styles to all buttons:
This change would greatly improve the flexibility of the ButtonGroup component, allowing it to be used in a wider variety of design contexts without the need for CSS overrides or custom components.
Environment:
Petal Components version: 2.0
Additional context:
This issue was encountered while trying to style button groups to match the background of a custom post component in a social media-like application. The current implementation required using CSS overrides with !important flags, which is not ideal for maintainability and consistency.
Title: ButtonGroup component lacks customization options for background and border colors
Description: The ButtonGroup component in Petal Components 2.0 has hardcoded background and border color styles in the
group_btn_base_class
function. This makes it difficult to customize the appearance of the buttons to match different design requirements without resorting to CSS overrides or creating custom components.Current behavior: The ButtonGroup component applies the following styles to all buttons:
These styles cannot be easily overridden or customized through the component's props.
Expected behavior: The ButtonGroup component should allow for easy customization of background and border colors, either through:
Suggested solution: Add new props to the ButtonGroup component, such as:
button_bg_class
: for customizing button background colorsbutton_border_class
: for customizing button border stylesThese props would then be used in the
group_btn_base_class
function to override the default styles when provided.Example usage:
This change would greatly improve the flexibility of the ButtonGroup component, allowing it to be used in a wider variety of design contexts without the need for CSS overrides or custom components.
Environment:
Additional context: This issue was encountered while trying to style button groups to match the background of a custom post component in a social media-like application. The current implementation required using CSS overrides with
!important
flags, which is not ideal for maintainability and consistency.