-
Notifications
You must be signed in to change notification settings - Fork 202
[nojira]add IconLabel #4174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[nojira]add IconLabel #4174
Conversation
There was a problem hiding this 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 the BpkIconLabel component to Backpack's design system. The component displays an icon alongside text with optional inline links, supporting three typography variants (body, label1, footnote) and two color schemes (default, on-dark).
Changes:
- New BpkIconLabel compound component with Root, Icon, and Text subcomponents
- Complete test suite with 23 tests (15 unit, 8 accessibility) achieving 100% coverage
- Storybook integration with 15 stories demonstrating all variants and use cases
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| specs/001-bpk-icon-label/*.md | Specification, plan, research, API design, styling guide, integration guide, and task files for the new component |
| packages/bpk-component-icon-label/src/BpkIconLabel.tsx | Main component implementation using React Context and compound component pattern |
| packages/bpk-component-icon-label/src/BpkIconLabel.module.scss | Styles with modern Sass, design tokens, and RTL support |
| packages/bpk-component-icon-label/src/BpkIconLabel-test.tsx | Unit tests covering all variants and functionality |
| packages/bpk-component-icon-label/src/accessibility-test.tsx | Accessibility tests using jest-axe |
| packages/bpk-component-icon-label/src/themeAttributes.ts | Theme configuration for BpkThemeProvider integration |
| packages/bpk-component-icon-label/src/common-types.ts | TypeScript type definitions |
| examples/bpk-component-icon-label/stories.tsx | Storybook story configuration |
| examples/bpk-component-icon-label/examples.tsx | Example implementations for Storybook |
| packages/bpk-mixins/_typography.scss | Updated link mixins to support theming via CSS custom properties |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - **BpkIconLabel.Text**: Text label component (can include inline links as children) | ||
|
|
||
| **Root Component Props**: | ||
| - **`type`** (string, optional, default: "body"): Typography variant - "body", "label1", or "footnote" |
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type value 'label1' in the specification uses a different format than 'label-1' which appears in the styling guide and other files. This inconsistency should be resolved to use 'label1' consistently throughout.
| import { background } from 'storybook/theming'; | ||
|
|
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import of 'background' from 'storybook/theming' appears to be unused in this file. This unused import should be removed to improve code clarity and maintainability.
| import { background } from 'storybook/theming'; |
|
Visit https://backpack.github.io/storybook-prs/4174 to see this build running in a browser. |
|
Visit https://backpack.github.io/storybook-prs/4174 to see this build running in a browser. |
Remember to include the following changes:
[Clover-123][BpkButton] Updating the colourREADME.md(If you have created a new component)README.md