Skip to content

Commit

Permalink
Fix inconsistencies in README
Browse files Browse the repository at this point in the history
add `defaultShowLabels` to config, fix showLabels attrs.
  • Loading branch information
Ilya Radchenko committed Apr 1, 2015
1 parent 6e86334 commit 4a3590c
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ in your template:
#### Labels
You can also show text labels on either side of toggle switch with:
````hbs
{{x-toggle showLabel='true' off='hey' on='ho' toggle='letsGo'}}
{{x-toggle showLabels=true off='Hey' on='Ho' toggle='letsGo'}}
````
Which would look like (using "default" theme):

Expand All @@ -40,7 +40,7 @@ It's perfectly normal to *not* need bindings for a toggle switch as the "toggle"
which happen at each state transition. Sometimes, however, it's easier to just bind your toggle switch to a property on the container. This is possible with use of the `value` binding:

````hbs
{{x-toggle value=controller.heyOrHo showLabel='true' off='hey' on='ho'}}
{{x-toggle value=controller.heyOrHo showLabels=true off='Hey' on='Ho'}}
````

This will ensure that the bound property is always set to the *true* or *false* value and as it's a two way binding this will allow the toggle
Expand All @@ -51,7 +51,7 @@ In order to support this functionality there is an overloaded form of setting th
for the state but also a "value". In our "hey" versus "ho" example you might do the following:

````hbs
{{x-toggle value=controller.heyOrHo showLabel='true' off='Hey:hey' on='Ho:ho'}}
{{x-toggle value=controller.heyOrHo showLabels=true off='Hey:hey' on='Ho:ho'}}
````

With this configuration the "value" for the **on** state will be `hey` and in the **off** state it will be `ho`. If the bound property
Expand Down Expand Up @@ -80,10 +80,11 @@ you will use.
ENV['ember-cli-toggle'] = {
includedThemes: ['light', 'default', 'flip'],
excludedThemes: ['flip'],
defaultTheme: 'light', // defaults to 'default'
defaultSize: 'small', // defaults to 'medium'
defaultOff: 'False', // defaults to 'Off'
defaultOn: 'True' // defaults to 'On'
defaultShowLabels: true, // defaults to false
defaultTheme: 'light', // defaults to 'default'
defaultSize: 'small', // defaults to 'medium'
defaultOff: 'False', // defaults to 'Off'
defaultOn: 'True' // defaults to 'On'
};
```
> note: the IOS theme is referred to as just `ios` not `ios7` as was indicated in the originating CSS source
Expand Down

0 comments on commit 4a3590c

Please sign in to comment.