Permalink
Browse files

doc: MaterialClass

  • Loading branch information...
MikeMitterer committed Jul 23, 2015
1 parent ab007db commit dd285ea006b11cbd2971de01d0b33273a4a2c41e
@@ -1,6 +1,6 @@
title: CLASS
samplename: class
sampleurl: https://github.com/MikeMitterer/dart-material-design-lite/tree/mdl/example/<%= pre %>_spa_class/web
sampleurl: https://github.com/MikeMitterer/dart-material-design-lite/tree/mdl/example/spa_class/web
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<div class="demo-preview-block">
<div class="testtext" mdl-class="checkBorder : 'withborder'">
@@ -77,7 +77,7 @@
</div>
</footer>
</div>
<a href="https://github.com/MikeMitterer/dart-material-design-lite/tree/mdl/example/<%= pre %>_spa_class/web" target="_blank" id="view-source">
<a href="https://github.com/MikeMitterer/dart-material-design-lite/tree/mdl/example/spa_class/web" target="_blank" id="view-source">
<button class="mdl-button mdl-js-button mdl-button--fab mdl-js-ripple-effect mdl-button--accent"><i class="material-icons">pageview</i></button>
</a>
<script type="application/dart" src="main.dart"></script>
@@ -35,6 +35,29 @@ class _MaterialClassConstant {
const _MaterialClassConstant();
}
/**
* Checks the given condition and adds the given class-name to the components [element]
*
* Sample:
*
* <div class="testtext" mdl-class="checkBorder : 'withborder'">
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et
* dolore magna aliquyam erat, sed diam voluptua.
* </div>
*
* <div class="switches">
* <label class="mdl-switch mdl-js-switch mdl-js-ripple-effect" for="switch-border">
* <input type="checkbox" id="switch-border" class="mdl-switch__input" mdl-model="checkBorder"/>
* <span class="mdl-switch__label">Switch 'border' on/off</span>
* </label>
* </div>
*
* @MdlComponentModel @di.Injectable()
* class Application extends MaterialApplication {
* ...
* final ObservableProperty<bool> checkBorder = new ObservableProperty<bool>(false);
* }
*/
@MdlComponentModel
class MaterialClass extends MdlComponent {
final Logger _logger = new Logger('mdltemplate.MaterialClass');

0 comments on commit dd285ea

Please sign in to comment.