Skip to content

Commit 8f93c02

Browse files
committed
adding instructions for basic form controls usage
1 parent 8cd3ede commit 8f93c02

File tree

2 files changed

+26
-7
lines changed

2 files changed

+26
-7
lines changed

‎css/index.css‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@ form {
1919
border-radius: 4px;
2020
background-color: #fff;
2121
}
22+
.description{
23+
margin-top:20px;
24+
padding: 20px;
25+
}

‎index.html‎

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
</div>
4343
<div id="navbar" class="navbar-collapse collapse">
4444
<ul class="nav navbar-nav">
45-
<li class="active"><a href="#">Getting started</a></li>
45+
<li><a href="#">Getting started</a></li>
4646
<li class="dropdown">
4747
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Demos <span class="caret"></span></a>
4848
<ul class="dropdown-menu">
@@ -61,7 +61,7 @@
6161
<ul class="nav navbar-nav navbar-right">
6262
<li><a href="http://github.com/tilwinjoy/angular-bootstrap-material">View on GitHub</a></li>
6363
<li><a href="http://github.com/tilwinjoy/angular-bootstrap-material/zipball/master">Download .zip</a></li>
64-
<li class="active"><a href="http://github.com/tilwinjoy/angular-bootstrap-material/tarball/master">Download .tar.gz</a></li>
64+
<li><a href="http://github.com/tilwinjoy/angular-bootstrap-material/tarball/master">Download .tar.gz</a></li>
6565
</ul>
6666
</div>
6767
<!--/.nav-collapse -->
@@ -112,7 +112,15 @@ <h5>Folating Labels</h5>
112112
</abm-form-group>
113113
</form>
114114
</div>
115-
<div class="col-xs-6"></div>
115+
<div class="col-xs-6 description">
116+
<p>Create a material design input by adding <code>abmFormControl</code> directive to an <code>input</code> element and wrapping it in <code>abmFormGroup</code> directive.</p>
117+
118+
<p>If the <code>input</code> is accompanied by a label, it should contain <code>abmLabel</code> directive.
119+
The behaviour of label can be controlled by adding a <code>type</code> attribute whos value can be either "floating" or "static"(default)</p>
120+
<p>
121+
You can control the size of the component by adding the classes "form-group-sm" or "form-group-lg" on the <code>abmFormGroup</code> directive.
122+
</p>
123+
</div>
116124
</div>
117125
<div class="row">
118126
<div class="col-xs-6">
@@ -124,7 +132,9 @@ <h4><a href="#input">Textarea</a></h4>
124132
</abm-form-group>
125133
</form>
126134
</div>
127-
<div class="col-xs-6"></div>
135+
<div class="col-xs-6 description">
136+
<p>Creating a material design textarea the same as creating an input, except that <code>abmFormControl</code> directive should be added to a <code>textarea</code> element.
137+
</div>
128138
</div>
129139
<div class="row">
130140
<div class="col-xs-6">
@@ -146,10 +156,13 @@ <h4><a href="#checkbox">Checkbox</a></h4>
146156
<div class="checkbox" abm-checkbox label="Item4">
147157
<input type="checkbox" ng-model="checkbox.item4">
148158
</div>
149-
150159
</form>
151160
</div>
152-
<div class="col-xs-6"></div>
161+
<div class="col-xs-6 description">
162+
<p>Create a material design checkbox by adding <code>abmCheckbox</code> directive to the checkbox input's wrapper.
163+
Add a <code>label</code> property on it to specify it's label</p>
164+
<p>Create a checkbox group by simply wrapping the checkboxes in a <code>abmFormGroup</code> directive</p>
165+
</div>
153166
</div>
154167
<div class="row">
155168
<div class="col-xs-6">
@@ -173,7 +186,9 @@ <h4><a href="#radio">Radio</a></h4>
173186
</div>
174187
</form>
175188
</div>
176-
<div class="col-xs-6"></div>
189+
<div class="col-xs-6 description">
190+
<p>Creating a material design radio or radio group is similar to creating a checkbox or checkbox group, except that <code>abmRadio</code> directive needs to be added to the radio input's wrapper.
191+
</div>
177192
</div>
178193
<div class="row">
179194
<div class="col-xs-6">

0 commit comments

Comments
 (0)