Skip to content
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

Add support for rendering Tag as link #2344

Merged
merged 4 commits into from
Dec 14, 2023
Merged

Add support for rendering Tag as link #2344

merged 4 commits into from
Dec 14, 2023

Conversation

connor-baer
Copy link
Member

@connor-baer connor-baer commented Dec 14, 2023

Purpose

Currently, the Tag component is rendered as an interactive button when passed the onClick prop. Therefore it makes sense to also support rendering it as an anchor (a) when passed the href prop to support use cases like a category tag on a blog.

Approach and changes

  • Render the Tag component as an a element when passed the href prop

Definition of done

  • Development completed
  • Reviewers assigned
  • Unit and integration tests
  • Meets minimum browser support
  • Meets accessibility requirements

Copy link

changeset-bot bot commented Dec 14, 2023

🦋 Changeset detected

Latest commit: 796cccd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@sumup/circuit-ui Minor
@sumup/eslint-plugin-circuit-ui Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Dec 14, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
oss-circuit-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 14, 2023 10:47am

Copy link

codecov bot commented Dec 14, 2023

Codecov Report

Merging #2344 (796cccd) into main (6980373) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2344   +/-   ##
=======================================
  Coverage   96.93%   96.93%           
=======================================
  Files         251      251           
  Lines       20171    20191   +20     
  Branches     1246     1247    +1     
=======================================
+ Hits        19552    19572   +20     
  Misses        607      607           
  Partials       12       12           
Files Coverage Δ
packages/circuit-ui/components/Tag/Tag.tsx 95.78% <100.00%> (+0.57%) ⬆️

@connor-baer connor-baer marked this pull request as ready for review December 14, 2023 10:53
@connor-baer connor-baer requested a review from a team as a code owner December 14, 2023 10:53
@connor-baer connor-baer merged commit e0fa9ef into main Dec 14, 2023
14 checks passed
@connor-baer connor-baer deleted the feature/tag-link-v7 branch December 14, 2023 10:54
@connor-baer connor-baer mentioned this pull request Dec 14, 2023
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.

1 participant