Skip to content

Feature: Component ButtonGroup#198

Draft
b1ink0 wants to merge 1 commit intodevelopfrom
feat/component-button-group
Draft

Feature: Component ButtonGroup#198
b1ink0 wants to merge 1 commit intodevelopfrom
feat/component-button-group

Conversation

@b1ink0
Copy link
Collaborator

@b1ink0 b1ink0 commented Feb 5, 2026

Description

This PR add a new ButtonGroup component based on Espresso by Frappe design.

Screenshot/Screencast


Checklist

  • I have thoroughly tested this code to the best of my abilities.
  • I have reviewed the code myself before requesting a review.
  • This code is covered by unit tests to verify that it works as intended.
  • The QA of this PR is done by a member of the QA team (to be checked by QA).

Copilot AI review requested due to automatic review settings February 5, 2026 07:54
@b1ink0 b1ink0 changed the base branch from main to develop February 5, 2026 07:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new ButtonGroup component based on the Timeless Figma design. The component provides a simple wrapper for grouping Button components together with shared properties while allowing individual buttons to override group-level settings.

Changes:

  • Added a new ButtonGroup component with TypeScript types, implementation, tests, and Storybook stories
  • Exported the component through the main components index
  • Includes comprehensive examples demonstrating various button configurations and variants

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/frappe-ui-react/src/components/index.ts Adds export for the new buttonGroup module
packages/frappe-ui-react/src/components/buttonGroup/types.ts Defines TypeScript interface for ButtonGroup props
packages/frappe-ui-react/src/components/buttonGroup/buttonGroup.tsx Implements the ButtonGroup component that renders a flex container with Button children
packages/frappe-ui-react/src/components/buttonGroup/index.ts Exports the component and types following established patterns
packages/frappe-ui-react/src/components/buttonGroup/tests/buttonGroup.tsx Provides test coverage for rendering, props application, className handling, and click events
packages/frappe-ui-react/src/components/buttonGroup/buttonGroup.stories.tsx Includes comprehensive Storybook stories demonstrating various use cases and configurations

fireEvent.click(screen.getByText("Action 2"));
expect(handleClick2).toHaveBeenCalledTimes(1);
});
});
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The component allows individual button props to override group-level props (size, variant, theme), as demonstrated in the IconMixedVariant story. However, there's no test verifying this override behavior. Consider adding a test case that verifies individual buttons can override group-level properties.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant