|
| 1 | +API |
| 2 | +--- |
| 3 | + |
| 4 | +* [Base](#base) |
| 5 | +* [Text](#text) |
| 6 | +* [Checkbox / Switch](#checkbox-/-switch) |
| 7 | +* [Radio](#radio) |
| 8 | +* [Date](#date) |
| 9 | +* Time (comming soon) |
| 10 | +* [Select](#select) |
| 11 | +* [Switch](#switch) |
| 12 | +* [Color](#color) |
| 13 | +* [Autocomplete](#autocomplete) |
| 14 | +* [Html](#html) |
| 15 | +* [Hidden](#hidden) |
| 16 | +* [Custom Message](#custom-message) |
| 17 | + |
| 18 | +### Base (Common props) |
| 19 | + |
| 20 | +| Props | Required | Type | Description | |
| 21 | +|-------------------|----------|------------------------|----------------------------------------------------| |
| 22 | +| label | false | string | | |
| 23 | +| helperText | false | string | | |
| 24 | +| disabled | false | boolean | | |
| 25 | +| validation | false | string | rules of validation | |
| 26 | +| validationContext | false | object { prop: value } | extra fields for validation bind (ex. required_if) | |
| 27 | +| errorMessage | false | string | custom error message from external validation | |
| 28 | + |
| 29 | +#### Text |
| 30 | + |
| 31 | +All [material-ui](https://material-ui.com/api/text-field/) props and: |
| 32 | + |
| 33 | +| Props | Required | Type | Description | |
| 34 | +|----------|----------|-------------------------|--------------------------------------| |
| 35 | +| value | true | any | | |
| 36 | +| mask | false | string | | |
| 37 | +| onChange | true | Function(string/number) | | |
| 38 | +| loading | false | boolean | if true will add a progress at right | |
| 39 | + |
| 40 | +#### Checkbox / Switch |
| 41 | + |
| 42 | +All material-ui |
| 43 | +[checkbox](https://material-ui.com/api/checkbox/) and |
| 44 | +[switch](https://material-ui.com/api/switch/) |
| 45 | + props and: |
| 46 | + |
| 47 | +| Props | Required | Type | Description | |
| 48 | +|------------|----------|------------------------------------------|-------------------------------| |
| 49 | +| value | false | any | if null will return a boolean | |
| 50 | +| checked | true | boolean | | |
| 51 | +| helperText | false | string | | |
| 52 | +| onChange | true | Function(value (if provided) or boolean) | | |
| 53 | + |
| 54 | +### Radio |
| 55 | + |
| 56 | +All material-ui [radio](https://material-ui.com/api/radio/) props and: |
| 57 | + |
| 58 | +| Props | Required | Type | Description | |
| 59 | +|------------|----------|-----------------|------------------------------------| |
| 60 | +| value | true | any | Value that will return if selected | |
| 61 | +| checked | true | boolean | | |
| 62 | +| helperText | false | string | | |
| 63 | +| onChange | true | Function(value) | | |
| 64 | + |
| 65 | + |
| 66 | +### Date |
| 67 | + |
| 68 | +All [material-ui-pickers](https://github.com/dmtrKovalenko/material-ui-pickers) props and: |
| 69 | + |
| 70 | +| Props | Required | Type | Description | |
| 71 | +|---------------|----------|----------------|----------------------------------| |
| 72 | +| value | true | Date | | |
| 73 | +| minDate | false | Date | | |
| 74 | +| maxDate | false | Date | | |
| 75 | +| disablePast | false | boolean | | |
| 76 | +| disableFuture | false | boolean | | |
| 77 | +| format | false | string | moment string format | |
| 78 | +| locale | false | string | use defaultDateLocale as default | |
| 79 | +| onChange | true | Function(date) | | |
| 80 | + |
| 81 | +#### Select |
| 82 | + |
| 83 | +All [material-ui](https://material-ui.com/api/select/) props and: |
| 84 | + |
| 85 | +| Props | Required | Type | Description | |
| 86 | +|----------|----------|------------------------------------------------|--------------------------------------| |
| 87 | +| value | true | any | | |
| 88 | +| options | true | object { value: string/number, label: string } | | |
| 89 | +| onChange | true | Function(string/number) | | |
| 90 | +| loading | false | boolean | if true will add a progress at right | |
| 91 | + |
| 92 | +#### Color |
| 93 | + |
| 94 | +| Props | Required | Type | Description | |
| 95 | +|----------|----------|------------------|-------------| |
| 96 | +| value | true | string | | |
| 97 | +| onChange | true | Function(string) | | |
| 98 | + |
| 99 | + |
| 100 | +#### Autocomplete |
| 101 | + |
| 102 | +| Props | Required | Type | Description | |
| 103 | +|----------|----------|------------------------------------------------|-------------| |
| 104 | +| value | true | any | | |
| 105 | +| options | true | object { value: string/number, label: string } | | |
| 106 | +| onChange | true | Function(string/number) | | |
| 107 | + |
| 108 | +#### Html |
| 109 | + |
| 110 | +| Props | Required | Type | Description | |
| 111 | +|----------|----------|------------------|-------------| |
| 112 | +| value | true | string | | |
| 113 | +| onChange | true | Function(string) | | |
| 114 | + |
| 115 | +#### Hidden |
| 116 | + |
| 117 | +| Props | Required | Type | Description | |
| 118 | +|-------|----------|------|-------------| |
| 119 | +| value | true | any | | |
| 120 | + |
| 121 | +#### Custom Message |
| 122 | + |
| 123 | +| Props | Required | Type | Description | |
| 124 | +|----------|----------|--------|--------------------| |
| 125 | +| rules | true | string | separated by comma | |
| 126 | +| children | true | string | message | |
0 commit comments