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

Draft
wants to merge 3 commits into
base: next
Choose a base branch
from
Draft

feat(tag-component): tag component #955

wants to merge 3 commits into from

Conversation

dilandoogan
Copy link
Contributor

@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
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.

5 participants