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
FEATURE: TS Rewrite #66
Conversation
Sebobo
commented
Oct 21, 2022
•
edited
edited
- Convert code to TypeScript
- Replace ReactCSS with CSS modules
- Use functional components
- Resolve Hide alpha value in hex mode #65
- Resolve Option to reset presetColors #53
- Resolve Allow setting string values via the preset color selector to choose theme colors #6
- Reduce bundle size (currently 123KB -> 112KB)
Also replaces ReactCSS usage with CSS modules
The previous array made it hard to override the global colors via custom settings Resolves: #53
1d33d1f
to
794da88
Compare
F.e. this can be used to set a CSS class instead of a color value Resolves: #6
794da88
to
3995d07
Compare
@jonnitto would love to have you as reviewer of this PR 🙂 |
The presethex:
type: string
ui:
label: 'Preset mode with hex values'
inspector:
editor: 'Shel.Neos.ColorPicker/ColorPickerEditor'
editorOptions:
mode: preset
presetColors:
- '#ff0000'
- '#00ff00'
allowEmpty: true CleanShot.2022-10-27.at.17.02.43.mp4 |
Also, the preset mode with non-hex values doesn't work correctly: preset:
type: string
ui:
label: 'Preset mode with objects'
inspector:
editor: 'Shel.Neos.ColorPicker/ColorPickerEditor'
editorOptions:
mode: preset
presetColors:
- color: rgb(var(--color-main-theme))
label: 'Main'
value: 'main'
- color: green
label: 'Grün'
value: 'minor'
- color: '#ff0000'
label: 'Rot'
value: red
allowEmpty: true |
Convert simple string presets into valid ColorDefinition objects
Thx for testing everything !!!
|
7c12e25
to
d8b916a
Compare