-
Notifications
You must be signed in to change notification settings - Fork 11
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): New Tag component #179
Conversation
✅ Deploy Preview for carbon-labs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
*/ | ||
render: ({ text, color, tooltipPosition, tooltipText, onClick }) => | ||
html` <clabs-tag | ||
.color=${color} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you're passing in a string to the attribute, you can pass it in normally
color=${color}
tooltip-position=${tooltipPosition}
tooltip-text=${tooltipText}
the .
is only used when you are passing in an object to the attribute of a lit component
— The colors need to be limited to be accessible. |
…into tag-element
Co-authored-by: Anna Wen <54281166+annawen1@users.noreply.github.com>
Hi @mjabbink, we kept the left side color open for the user to input whatever they want for flexibility. The current use case for the Watsonx Proof of Technology is for the Tag to represent a data table, with summary information in the tooltip on hover & when clicked. The left side color would be a way to differentiate different types of tables. I'm not sure about what the different types could be though, @daniel-karl would be better to answer these questions.
The text are database table names, so I believe it's out of our control.
No deleting as far as I know, and only actions are hover and click. |
This reverts commit c44ff79.
@lily-peng The colors alone are not accessible. e.g. a color blind person might see the difference between the colors, so they wold need another way to distinguish between the “types” of tags. If the name of the tag does that then ok, but if the name does not make it clear, not will the color help. The user wold also need to know what the color meant and if changing this cold also pose a problem. |
Closes #219
A tag component that is used to represent a data table.
Examples:
![image](https://private-user-images.githubusercontent.com/3118961/336946292-5df5619d-0eee-4bd8-bf5a-99aaa9cbe34e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA0NzI3NDAsIm5iZiI6MTcyMDQ3MjQ0MCwicGF0aCI6Ii8zMTE4OTYxLzMzNjk0NjI5Mi01ZGY1NjE5ZC0wZWVlLTRiZDgtYmY1YS05OWFhYTljYmUzNGUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcwOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MDhUMjEwMDQwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MWViZmFmNzE5MGY5NGIyOTUxMWQyYWUxNzNmNGM2NmE3ZjIwODI4OTMzMGY4ZGIwNWI1ODk4MjUyYTJiZDgzYSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.HIzX0zn_Hnp7B5WCTrpXXDpwlvySQ7_-HGNRPK0Gw5E)
Features:
Changelog
New
Changed
Removed
Testing / Reviewing
{{ Add descriptions, steps or a checklist for how reviewers can verify this PR works or not }}