TEHIK-EE / tedi-design-system

TEDI is TEHIK design system
2 stars 11 forks source link

Status badge #174

Open airikej opened 1 week ago

airikej commented 1 week ago

https://github.com/TEHIK-EE/tedi-design-system/issues/130

Component name: Badge Figma design?node-id=2385-24154&m=dev)

Community Tag component will break into 2 components: Badge and Tag:

Badge API:

Name Required/Optional Descrption Type Possible values Default
children Required The content to be displayed inside the Badge React.ReactNode
className Optional Additional class name(s) to apply to the element string
color Optional Specifies the color scheme of the Badge (e.g., primary, warning, etc.) BadgeColor 'default' \| 'primary' \| 'accent' \| 'positive' \| 'warning' \| 'important' default
variant Optional Determines the style or visual type of the Tag (e.g., filled, outlined, etc.) BadgeVariant 'filled' \| 'filled-bordered' \| 'outlined' default
size Optional Specifies the size of the Badge, such as default, or large BadgeSize 'default' \| 'large' default
id Optional ID attribute string
title Optional Provides the full text or description when the Badge represents an abbreviation. This is typically shown as a tooltip on hover string

Changes:

Need clarification from community:

Suggestions for development/future ideas:

airikej commented 3 days ago

hasArrow prop will be removed, status prop will be added.

Design questions: Right now "invisible" and "default" types are missing in the new Badge

karolin-kivisikk commented 1 day ago

Status badge with dot-indicator has been added to Figma?node-id=2385-24154&t=pQAO0g4IeKdgAGJz-4).

Potential migration Community tag vs TEDI status badge solution: Community TEDI-ready
Color=default Variant=default
Color=primary Variant=primary
Color=accent Variant=accent
Color=positive Variant=success
Color=warning Variant=warning
Color=important Variant=danger
Type=default HasFillcolor=True + HasBorder=true (if bright color is used only for contrast from the background then switching tedi new badge border on should do the trick)
Type=secondary HasFillcolor=True
Type=ghost HasBorder=true
Type=invisible use text variables, status-badge-text-default, status-badge-text-primary etc..
Arrow=true -
Status=true ShowStatusIndicator=true
Rounded=true -
Size=large Size=large
IconOnly=true IconOnly=true
- ShowIcon=true (adds icon to text)
- IconOnly=true

As I understand rounded and hasArrow are not relevant anymore so the migration is not necessary? Bright colors were only used to add contrast (used on elements that have grey surfaces)? If that's the case then new badge border should solve this problem. If not then I would like to know some specific use cases to decide if bright colors are needed in the base component set cause it's not common to have multiple sets of status colors in the selection.