Skip to content

Commit

Permalink
feat(i18n): add support for translatable typeUserAttrs
Browse files Browse the repository at this point in the history
resolves #919
  • Loading branch information
kevinchappell committed Mar 29, 2019
1 parent 393f33b commit 158b278
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 98 deletions.
4 changes: 3 additions & 1 deletion docs/formBuilder/options/typeUserAttrs.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Attribute input types are generated using the `typeof` for the value. Custom att
const typeUserAttrs = {
text: {
shape: {
label: 'Class',
label: 'Class', // i18n support by passing and array eg. ['optionCount', {count: 3}]
multiple: true, // optional, omitting generates normal <select>
options: {
'red form-control': 'Red',
Expand All @@ -21,6 +21,8 @@ const typeUserAttrs = {
};
```

## [Example with i18n support](https://codepen.io/kevinchappell/pen/EMqvbG?editors=1010)

## Example Checkbox
```javascript
const typeUserAttrs = {
Expand Down
Loading

0 comments on commit 158b278

Please sign in to comment.