|
1 | 1 | const id = 'classes' |
2 | 2 |
|
3 | | -const title = 'Classes and styles' |
| 3 | +const title = 'Layout, classes and styles' |
4 | 4 |
|
5 | | -const description = `You can define classes on the wrapping element of each property using a \`x-class\` annotation. If you use layout management classes you can then position properties next to each other for examples. |
| 5 | +const description = `You can define classes on the wrapping element of each property using the \`x-class\` annotation. |
6 | 6 |
|
7 | 7 | To write CSS rules directly on the wrapping element of a property use the \`x-style\` annotation. |
8 | 8 |
|
9 | | -There are also classes that can be defined as options: \`objectContainerClass\`, \`sectionsClass\`, \`sectionsTitlesClasses\`, \`childrenClass\`.` |
| 9 | +To customize the responsive layout of your form you can use the \`x-cols\` annotation or the \`fieldColProps\` option. |
| 10 | +
|
| 11 | +There are also many options that can be used to apply classes to different parts of your form: \`objectContainerClass\`, \`sectionsClass\`, \`sectionsTitlesClasses\`, \`childrenClass\`, etc.` |
10 | 12 |
|
11 | 13 | const schema = { |
12 | 14 | type: 'object', |
13 | 15 | properties: { |
14 | | - stringPropHalf: { type: 'string', title: `I'm a half width string`, 'x-class': 'xs6' }, |
15 | | - stringPropHalf2: { type: 'string', title: `I'm another half width string`, 'x-class': 'xs6' }, |
| 16 | + stringPropHalf: { type: 'string', title: `I'm a half width string using x-cols`, 'x-cols': 6 }, |
| 17 | + stringPropHalf2: { type: 'string', title: `I'm another half width string using fieldColProps option`, 'x-options': { fieldColProps: { cols: 6 } } }, |
| 18 | + stringPropClass: { type: 'string', title: `I'm a string with class pl-10`, 'x-class': 'pl-10' }, |
16 | 19 | stringPropStyle: { type: 'string', title: `I'm a string with style`, 'x-style': 'background-color: pink; padding-left: 20px;' } |
17 | 20 | } |
18 | 21 | } |
|
0 commit comments