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

Add Chip component #244

Open
arturbien opened this issue Jun 18, 2021 · 3 comments
Open

Add Chip component #244

arturbien opened this issue Jun 18, 2021 · 3 comments

Comments

@arturbien
Copy link
Member

(See yellow buttons)

image

@hyperloo
Copy link

hyperloo commented Aug 29, 2021

Hi @arturbien, can I work on this component? This seems to be interesting and a beginner's friendly start.
image

The thing that I have noticed is:

  1. Each tag has an Image and a text.
  2. A tag can be a multi-texted tab.

The things that I would like to know about the component is:

  1. Will the size of the tag be variable, i.e. one can change width, height, border-radius & padding of the tag?
  2. Can a tag have either an Image or text only?
  3. Can there be multiple images in a Tag like multi-text in tag 1?
  4. Is there a delete tag option to be present in the tag?

What other features will you like to have in this component?

I hope these questions seem to be genuine to you.

Note: It is my very initial requests so ignore any informality in the request.

@arturbien
Copy link
Member Author

arturbien commented Sep 2, 2021

Hey @hyperloo and welcome to React95 ❤️ sorry for late response, been busy lately.

First of all let's rename this component to Chip as it seems to be more popular naming convention.

And let's keep it simple for now. I think basic requirements would be:

  1. Make it the same size as Button component (with the same size prop)
  2. Make it accept only text (no need for images/icons right now) passed as label prop
  3. When onClick is passed, add role='button' and tabindex=0 attributes for accessibility and to make it focusable
  4. Five new colors will have to be added to the theme: chipBackground, chipBorderLight, chipBorderDark, chipOutline and chipText. For now it's okay to add the same colors across every theme.
  5. Border radius is probably going to be like 10px
  6. All borders and outlines in React95 always have 2px width

As a reference see React95 Button component and Material UI's Chip component: https://material-ui.com/components/chips/#chip

If you need any further help feel free to join our Slack channel (link in the docs) 💪

@arturbien arturbien changed the title Add Tag component Add Chip component Sep 2, 2021
@hyperloo
Copy link

hyperloo commented Sep 7, 2021

@arturbien Have a look at this PR which I made earlier. I have made it for the Tag Component. #251

Should I keep this component and create a new Chip Component.

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

No branches or pull requests

2 participants