eclipsesource / eclipsesource/jsonforms
Support different classes for different controls
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 424
- Avg merge
- 17d 8h
- Merged PRs (30d)
- 1
Description
### Is your feature request related to a problem? Please describe.
I cannot use the Bootstrap classes with the Vanilla renderer because the Vanilla renderer only lets you set one class for all `input` control types.
In Bootstrap the inputs should have the `form-control` class but for checkboxes it should be `form-check-input` instead.
### Describe the solution you'd like
A way to configure different CSS classes for different input types.
https://github.com/eclipsesource/jsonforms/blob/master/packages/vue-vanilla/src/styles/defaultStyles.ts
Perhaps:
```javascript
control: {
root: 'control',
wrapper: 'wrapper',
label: 'label',
description: 'description',
input: 'input',
error: 'error',
textarea: 'text-area',
select: 'select',
option: 'option',
},
```
could be:
```javascript
control: {
root: 'control',
wrapper: 'wrapper',
label: 'label',
description: 'description',
input: {
color: 'form-control form-control-color',
checkbox: 'form-input-check',
radio: 'form-input-check',
default: 'form-control'
},
error: 'error',
textarea: 'text-area',
select: 'select',
option: 'option',
},
```
### Describe alternatives you've considered
Fork the Vanilla renderer.
### Framework
Vue 3
### RendererSet
Vanilla
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.