Skip to content

feat(IconButton): allow custom colors#379

Open
michigg wants to merge 1 commit intomainfrom
fix/icon-button-allow-custom-colors
Open

feat(IconButton): allow custom colors#379
michigg wants to merge 1 commit intomainfrom
fix/icon-button-allow-custom-colors

Conversation

@michigg
Copy link
Copy Markdown
Contributor

@michigg michigg commented Sep 8, 2025

Adds variant blank that allows for color overwrites

@michigg michigg requested a review from Copilot September 8, 2025 15:11
Copy link
Copy Markdown

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 adds a new "blank" variant to the IconButton component that allows developers to override default colors using CSS variables. This enables custom styling while maintaining the component's structure and functionality.

  • Added a new "blank" variant that provides no default coloring
  • Updated transition styles to include color and background-color changes
  • Fixed missing Bootstrap class prefix in IconInfoCircle component

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
IconInfoCircle.vue Fixed missing "bi" class prefix for Bootstrap icon
IconButton.vue Added "blank" variant with customizable CSS variables and enhanced transitions
IconButton.stories.ts Added Storybook examples demonstrating custom color usage with the new variant

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


&.blank {
--_icon-button-color: var(--icon-button-color, var(--color-font-1));
--_icon-button-bg-color: var(--icon-button-bg-color, transparent);
Copy link

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

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

The blank variant is missing hover color definition. Consider adding --_icon-button-bg-hover-color: var(--icon-button-bg-hover-color, var(--color-neutral-200)); to ensure consistent hover behavior when custom colors are not provided.

Suggested change
--_icon-button-bg-color: var(--icon-button-bg-color, transparent);
--_icon-button-bg-color: var(--icon-button-bg-color, transparent);
--_icon-button-bg-hover-color: var(--icon-button-bg-hover-color, var(--color-neutral-200));

Copilot uses AI. Check for mistakes.
Comment on lines +327 to +329
* Custom colors with filled style
*
*
Copy link

Copilot AI Sep 8, 2025

Choose a reason for hiding this comment

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

The JSDoc comment is incomplete and contains empty lines. It should provide a meaningful description of what this story demonstrates, similar to the CustomColors story above.

Suggested change
* Custom colors with filled style
*
*
* An example of a custom styled IconButton using CSS variables with a filled background.
* These styles override the default styles of the IconButton component to demonstrate
* how to apply custom colors, background, and sizing with a filled appearance.
*
* - `--icon-button-color`: The color of the icon.
* - `--icon-button-bg-color`: The background color of the button.
* - `--icon-button-bg-hover-color`: The background color of the button on hover.
* - `--icon-button-font-size`: The size of the icon.
* - `--icon-button-radius`: The border radius of the button.
* - `--icon-button-padding`: The padding inside the button.
*
* Note: For maintainability, consider using a CSS class or scoped style block
* instead of inline styles in a real application.

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.

3 participants