Skip to content

Commit b13c297

Browse files
committed
added instructions to readme
1 parent 00043eb commit b13c297

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,30 @@ Note that this is still a work in progress so some fields are under construction
5555
##Options
5656

5757
###Global options
58-
There are some options that
58+
These options are used by all the different field types. Some fields may have special options and these will be specified below.
59+
| Property | Type | Default | Description |
60+
| --- | --- | --- | --- |
61+
| $dirty | `boolean` | `false` | ***RESTRICTED*** This is set by the system and is just there for your reference. It gets set to `true` upon blur or change, whichever happens first. |
62+
| $active | `boolean` | `false` | ***RESTRICTED*** Also set by the system and is set to true on focus. |
63+
| onBlur | `function(e)` | `null` | A function to run on @blur event |
64+
| onFocus | `function(e)` | `null` | A function to run on @focus event |
65+
| onClick | `function(e)` | `null` | A function to run on @click event |
66+
| onChange | `function(e)` | `null` | A function to run on @change event |
67+
| onKeyup | `function(e)` | `null` | A function to run on @keyup event |
68+
| onKeydown | `function(e)` | `null` | A function to run on @keydown event |
69+
| atts | `object` | `null` | Pass an object of attributes to be added to the element. eg `{ placeholder: 'hello world' }` |
70+
| classes | `object` | `null` | Pass an object of classes to be added to the element. Follows the Vue bindings where each key matches a boolean value. eg `{ 'class-a': true, 'class-b': false }` In this case class-a will be attached. |
71+
| id | `string` | `null` | An ID string to attach to the element |
72+
73+
###Input options
74+
| Property | Type | Default | Description |
75+
| --- | --- | --- | --- |
76+
| inputType | `string` | `text` | The 'type' attribute to pass to the input. |
77+
78+
###Select options
79+
| Property | Type | Default | Description |
80+
| --- | --- | --- | --- |
81+
| options | `array` | `null` | Pass either an array of strings or objects. Objects require a `label` and `value` property. If a string is passed then it will be used for the value and the label. eg: `options: ['Foo', 'Bar']` or `options: [{ label: 'Foo', value: 'bar'},{label: 'Bar', value: 'foo'}] |
5982

6083
##To Do
6184
* [x] Input

0 commit comments

Comments
 (0)