-
Notifications
You must be signed in to change notification settings - Fork 182
feat: add disabled state to the create item option #1911
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 2c39d3e The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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 you should include this story in the storybook docs page too
@@ -47,6 +47,7 @@ interface ComboboxProps | |||
Omit<ComboboxPrimitive.TextInputProps, 'required' | 'disabled' | 'value' | 'onChange' | 'size'> { | |||
clearLabel?: string; | |||
creatable?: boolean | 'visible'; | |||
creatableDisabled?: boolean; |
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.
&&[data-disabled] { | ||
color: ${({ theme }) => theme.colors.neutral600}; | ||
background: ${({ theme }) => theme.colors.neutral150}; | ||
cursor: not-allowed; | ||
} |
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.
What does it do?
Add a new disabled state, and style, to the Combobox Create item option
Why is it needed?
We want to show the combobox options and disable the combobox create item button in case the user has no permission to create an item.
How to test it?
In the storybook you can find a new Combobox Creatable disabled section to check the solution provided.
Related issue(s)/PR(s)
CS-1405