-
Notifications
You must be signed in to change notification settings - Fork 10
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
fix(Tag): New variants, Icon only, docs update, improvements #1011
Conversation
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.
Great styles refactor! 🔥 Good job with docs as well 💪
const kinds: Array<TagKind> = [ | ||
'default', | ||
'info', | ||
'warning', | ||
'success', | ||
'error', | ||
'purple', | ||
'black', | ||
'gray', | ||
'gradient01', | ||
'gradient02', | ||
'gradient03', | ||
'gradient04', | ||
'gradient05', | ||
'gradient06', | ||
'gradient07', | ||
'gradient08', | ||
'gradient09', | ||
'gradient10', | ||
'gradient11', | ||
]; |
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.
I think we can move it to constants and then, based on this, we can generate our type TagKind
. Thanks to this we will always have the stories synchronized automatically.
@@ -10,14 +13,90 @@ import * as Stories from './Tag.stories'; | |||
|
|||
## Intro <a id="Intro" /> | |||
|
|||
<Canvas of={Stories.Default} sourceState="none" /> | |||
#### Basic implementation example |
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.
I think we can make the headings with h3
#### Basic implementation example | |
### Basic implementation example |
<Tag>Example tag</Tag> | ||
``` | ||
|
||
#### Using tag with icons |
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.
#### Using tag with icons | |
### Using tag with icons |
</Tag> | ||
``` | ||
|
||
#### Using tag with close button |
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.
#### Using tag with close button | |
### Using tag with close button |
</Tag> | ||
``` | ||
|
||
#### Using tag with icon only <a id="IconOnly" /> |
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.
#### Using tag with icon only <a id="IconOnly" /> | |
### Using tag with icon only <a id="IconOnly" /> |
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.
🤘
Resolves: #885
Description
Improving
Tag
component with:iconOnly
flag (check docs how to use it correctly)kind
variantsdismissibleOnHover
flag to show the close button on component hoverdismissible
flag is now deprecated (but still supported), as passingonRemove
will be responsible for showing the close button (in the old implementation you had to passonRemove
anddismissible
to display the close button)Additionally, I cleaned up the styles and some component code in our current target direction.
Storybook
https://feature-885--613a8e945a5665003a05113b.chromatic.com/?path=/docs/components-tag--docs
Checklist
Obligatory:
livechat/design-system
)