Skip to content

Conversation

albozek
Copy link
Contributor

@albozek albozek commented Oct 13, 2025

Copy link

@Copilot 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 implements a new Tag component for the design system, providing a reusable UI element with multiple visual variants and sizes.

  • Adds Tag component with comprehensive type system including primary, success, warning, error, and ghost variants
  • Implements responsive sizing (medium/small) and icon support functionality
  • Integrates styling system with SCSS mixins and comprehensive visual theming

Reviewed Changes

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

Show a summary per file
File Description
packages/components/src/components/Tag/index.ts Exports Tag component and types
packages/components/src/components/Tag/Tag.types.ts Defines TagSize, TagType enums and TagProps interface
packages/components/src/components/Tag/Tag.tsx Main Tag component implementation with conditional rendering
packages/components/src/components/Tag/Tag.stories.tsx Storybook stories for all Tag variants
packages/assets/src/scss/styles.scss Imports tags stylesheet
packages/assets/src/scss/mixins/_tags.scss Tag-specific SCSS mixins
packages/assets/src/scss/mixins/_buttons.scss Refactors button state mixin for reusability
packages/assets/src/scss/_tags.scss Complete Tag component styling with variants and themes

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

export const Tag = ({ children, className = '', isDark = false, icon, size = TagSize.Medium, type }: TagProps) => {
const isGhostType = (tagType: TagType | TagGhostType): tagType is TagGhostType => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
return Object.values(TagGhostType).includes(tagType as TagGhostType);
Copy link
Contributor Author

@albozek albozek Oct 15, 2025

Choose a reason for hiding this comment

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

In this case, the use of as to check whether a specific type exists in the enum string cannot be omitted, that's why rule 'no-unsafe-type-assertion' is disabled here

@dew326 dew326 merged commit 5ee10d9 into main Oct 15, 2025
4 checks passed
@dew326 dew326 deleted the IBX-7844 branch October 15, 2025 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants