Color picker: allow to pass custom color suggestions
What does this MR do and why?
There's a Color picker GitLab UI component: https://design.gitlab.com/components/color-picker. Using the component, you can set a HEX value or you can select one of the predefined "suggested colors". However, these "suggested colors" are hard-coded.
This MR allows to pass custom "suggested colors" using the suggestedColors
property.
Note: This MR blocks !78281 (merged).
/cc @bufferoverflow
Screenshots
Default suggested colors | Custom suggested colors |
---|---|
How to set up and validate locally
The ColorPicker component is used in ee/app/assets/javascripts/groups/settings/compliance_frameworks/components/shared_form.vue
.
- Open
ee/app/assets/javascripts/groups/settings/compliance_frameworks/components/shared_form.vue
- Pass custom suggested colors:
<color-picker ... :suggestedColors="{ '#ff0000': 'Red', '#808080': 'Gray' }"/>
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Jonas Wälter