TEHIK-EE / tedi-design-system

TEDI is TEHIK design system
2 stars 11 forks source link

Tag #166

Open airikej opened 2 weeks ago

airikej commented 2 weeks ago

Figma design?node-id=2405-49830&m=dev)

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

New simplified Tag component would have API like this:

Name Required/Optional Descrption Type Possible values Default
children Required Any content to be rendered within the tag component React.ReactNode \| React.ReactNode[]
className Optional Additional class name(s) to apply to the element string
onClose Optional Callback fired when the Tag close button is clicked MouseEventHandler<HTMLButtonElement>
isLoading Optional If Tag has loading state boolean false
kasparsuvi1 commented 1 week ago
  1. Should it also have isLoading property? For example if we want to use this new Tag in fileUpload, we should indicate how long the file is loading? (with spinner)
  2. will it be replaced in Community components? Which ones?
airikej commented 1 week ago
  1. Sounds like a reasonable suggestion for me but have to discuss this with TEDI team
  2. This component is tricky and can't be replaced so straight forwardly so we would have to leave Community-s Tag to Community right now and change them while we are bringing more components over to Tedi-ready
karolin-kivisikk commented 5 days ago
  1. Should it also have isLoading property? For example if we want to use this new Tag in fileUpload, we should indicate how long the file is loading? (with spinner)
  2. will it be replaced in Community components? Which ones?

@kasparsuvi1 you mean loader like this?

Screenshot 2024-09-11 at 14 59 16

airikej commented 4 days ago

Upgraded the API regarding to isLoading prop