-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[Joy] Add Chip
component
#31983
[Joy] Add Chip
component
#31983
Conversation
@mui/joy: parsed: +5.93% , gzip: +3.81% |
From the issues that I can find:
I am thinking about these changes
// implementation
<ChipRoot>
...startDecorator
<ChipLabel>{children}</ChipLabel>
...endDecorator
</ChipRoot>
// usage
<Chip>text</Chip>
|
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.
introduce ChipButton, and ChipDelete component instead of using clickable, onDelete and deleteIcon prop.
This is a great idea. Other than that, it's looking pretty good to me!
@hbjORbj Could you replicate some of these design inspirations in the |
Yes, I can do that.
Yes, I agree it looks better. I will work on it.
Sure, no problem. |
55bbcdc
to
134fa24
Compare
Here are updates:
|
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 start! I'll probably tweak some styles later on but this is excellent already :)
Summary of my changes
|
This PR includes:
SvgIcon
demo / JoyAvatar
demo / JoyAvatar
API codeChip
componentChip
componentProps:
startDecorator
,endDecorator
,color
,size
,variant
,disabled
Default values:
color
:primary
size
:md
variant
:contained
disabled
:false
I removed
onDelete
,icon
,avatar
,label
,clickable
anddeleteIcon
props and addedstartDecorator
/endDecorator
following up with this discussionPreview: https://deploy-preview-31983--material-ui.netlify.app/experiments/joy/chip/
Lines of code comparison