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

feat(Tag): allow custom tag color #724

Merged
merged 8 commits into from
Jan 9, 2024
Merged

feat(Tag): allow custom tag color #724

merged 8 commits into from
Jan 9, 2024

Conversation

Cata1989
Copy link
Collaborator

@Cata1989 Cata1989 commented Dec 22, 2023

The purpose of this PR is to introduce the possibility to add a custom color for bq-tag component.

@Cata1989 Cata1989 force-pushed the feat/custom-tag-color branch 2 times, most recently from 148d2a6 to 4f1a2fa Compare December 31, 2023 10:33
@endv-bogdanb
Copy link
Collaborator

endv-bogdanb commented Jan 3, 2024

I would not introduce another property, rather use the existing one. I would start with updating types for TTagColor:

export type TTagColor = (typeof TAG_COLOR)[number] | string & {};

This will still give TAG_COLOR suggestions but accept any other string. Then you will have to update the logic of hasCustomColor and also use getColorCSSVariable as bq-icon does. Custom color should be from existing palette.

@Cata1989 Cata1989 force-pushed the feat/custom-tag-color branch from 4f1a2fa to 826a3c2 Compare January 9, 2024 07:31
@Cata1989 Cata1989 marked this pull request as ready for review January 9, 2024 11:27
Copy link

sonarqubecloud bot commented Jan 9, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@dgonzalezr dgonzalezr changed the title feat(Tag): introduce logic for assigning custom tag colors feat(Tag): allow custom tag color Jan 9, 2024
@dgonzalezr dgonzalezr merged commit ff05338 into main Jan 9, 2024
5 checks passed
@dgonzalezr dgonzalezr deleted the feat/custom-tag-color branch January 9, 2024 15:41
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