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-component): tag component #955

Merged
merged 16 commits into from
Feb 19, 2025
Merged

feat(tag-component): tag component #955

merged 16 commits into from
Feb 19, 2025

Conversation

dilandoogan
Copy link
Collaborator

@dilandoogan dilandoogan commented Nov 6, 2024

Figma Design Document

https://www.figma.com/design/RrcLH0mWpIUy4vwuTlDeKN/Baklava-Design-Guide?node-id=25001-1763&t=xA7DTWjCkA2EqaDc-1

Implementation

General usage example:

<bl-tag>In Progress</bl-tag>

Usage Examples

Selectable variant usage:

<bl-tag @bl-tag-click="handleTagClick" selected>Selectable tag</bl-tag>

The removable variant can be set like this:

const handleTagClick=(event)=>{
   tags.filter((tag)=>tag.value!==event.value)
}
<bl-tag variant="removable" @bl-tag-click="handleTagClick">Removable tag</bl-tag>

The icon can be set like this:

<bl-tag icon="info">Default</bl-tag>

The size and disabled attributes can be set like this:

<bl-tag size="large" disabled>In Progress</bl-tag>

API Reference:

Slots

Name Description Default Content
icon slot Icon of the tag -

Attributes

Attribute Description Default Value
size (string) Size of tag(small,medium,large) medium
icon (bl-icon) Name of the icon that will be shown in tag -
variant (string) Variants of the tag(selectable,removable) selectable
disabled (boolean) Makes tag disabled false
selected (boolean) Makes tag selected false
value (string) Sets tags value -

Events

Name Description Payload
bl-tag-click Fires when tag is clicked {value:string,selected:boolean}

@dilandoogan dilandoogan changed the title feat(tag-component): tag component adr feat(tag-component): tag component Nov 6, 2024
Enes5519
Enes5519 previously approved these changes Nov 7, 2024
fatihhayri
fatihhayri previously approved these changes Nov 7, 2024
Copy link
Collaborator

@erbilnas erbilnas left a comment

Choose a reason for hiding this comment

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

In my opinion we should also add a tag-group wrapper to get all selected tags' ids. Also using bl-click instead of bl-tag-click is enough I guess

@AykutSarac
Copy link
Member

In my opinion we should also add a tag-group wrapper to get all selected tags' ids. Also using bl-click instead of bl-tag-click is enough I guess

Yes, that's in the roadmap but we decided to develop the tag first and group element later.

@AykutSarac AykutSarac dismissed stale reviews from fatihhayri and Enes5519 via c76244c December 17, 2024 14:40
@AykutSarac AykutSarac marked this pull request as draft December 17, 2024 14:40
@erbilnas erbilnas self-requested a review December 26, 2024 14:42
@erbilnas erbilnas marked this pull request as ready for review December 26, 2024 14:43
erbilnas
erbilnas previously approved these changes Dec 26, 2024
Enes5519
Enes5519 previously approved these changes Jan 30, 2025
ozkersemih
ozkersemih previously approved these changes Feb 13, 2025
@buseselvi
Copy link
Contributor

There have been changes in the paddings in the design, can you check them? 🙏

@AykutSarac AykutSarac dismissed stale reviews from ozkersemih and Enes5519 via 1d5e845 February 18, 2025 15:30
AykutSarac
AykutSarac previously approved these changes Feb 18, 2025
@AykutSarac AykutSarac requested a review from buseselvi February 18, 2025 16:33
fatihhayri
fatihhayri previously approved these changes Feb 19, 2025
@AykutSarac AykutSarac dismissed stale reviews from fatihhayri and themself via 4f69b9a February 19, 2025 08:20
@AykutSarac AykutSarac merged commit a59a00b into next Feb 19, 2025
8 checks passed
@AykutSarac AykutSarac deleted the tag-component branch February 19, 2025 14:45
Copy link

🎉 This PR is included in version 3.3.0-beta.24 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version 3.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

8 participants