-
Notifications
You must be signed in to change notification settings - Fork 839
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: add append
option to palette picker options
#8208
Conversation
cursor: default; | ||
cursor: inherit; |
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 changed this so that when the badge is placed inside a clickable component, such that clicking the badge will bubble up and trigger a click handler, the cursor should adopt to the parent component style by default. If the badge itself is clickable, this cursor style is overridden.
Rather than add an API for an extremely specific use-case, why not make If we want to put some guard rails around custom renders, I'd also be open to a more limited |
Ok I made the |
@nickofthyme: Apologies for sticking my nose into this PR. Regardless of the technical implementation, I'm personally not a fan of appending an Thoughts? CCing @gvnmagni. |
No problem at all, happy to get your thoughts. I like your proposal better. Updated in fb1b41d. |
packages/eui/src/components/color_picker/color_palette_picker/color_palette_picker.tsx
Outdated
Show resolved
Hide resolved
@nickofthyme Fyi, I'll be taking over as reviewer on this 🙂 |
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 also update this section in our EUI docs to mention the possibility to add custom content and add an append
to one option for the examples:
packages/eui/src-docs/src/views/color_picker/color_picker_example.js
packages/website/docs/components/forms/color_selection.mdx
packages/eui/src/components/color_picker/color_palette_picker/color_palette_picker.stories.tsx
Outdated
Show resolved
Hide resolved
packages/eui/src/components/color_picker/color_palette_picker/color_palette_picker.stories.tsx
Outdated
Show resolved
Hide resolved
packages/eui/src/components/color_picker/color_palette_picker/color_palette_picker.stories.tsx
Outdated
Show resolved
Hide resolved
packages/eui/src/components/color_picker/color_palette_picker/color_palette_picker.tsx
Show resolved
Hide resolved
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.
@nickofthyme I took the liberty to add the mentioned changes to your branch. I hope you don't mind.
Additionally I ran snapshot updates to unblock the pipeline and ran VRT to add images for the newly added story.
packages/eui/src/components/color_picker/color_palette_picker/color_palette_picker.tsx
Outdated
Show resolved
Hide resolved
Preview staging links for this PR:
|
💚 Build Succeeded
History
cc @mgadewoll |
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.
🚢 🐈⬛ Thanks for the contribution and your patience! 🎉
to account for the `title` being mandatory on EuiColorPalettePickerPaletteProps See elastic/eui#8208 (comment)
append
option to palette picker options
Summary
Updated
EuiColorPalettePicker
- addsappend
toEuiColorPalettePickerPaletteProps
to support appending custom content to the title. This allows tagging the mainelastic
palette asDefault
without using parenthesis (i.e.Elastic (default)
), see elastic/kibana#192848 (comment).See storybook demo here.
QA
Remove or strikethrough items that do not apply to your PR.
General checklist
@default
if default values are missing) and playground toggles