Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
docs(fabSpeedDial): add demo showing tooltip usage
Browse files Browse the repository at this point in the history
users have difficulty utilizing tooltips without an example

references #3338, references #3277, references #3236
  • Loading branch information
topherfangio committed Jun 24, 2015
1 parent 234f89f commit a5807e0
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/fabSpeedDial/demoBasicUsage/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<md-button aria-label="facebook" class="md-fab md-raised md-mini">
<md-icon md-svg-src="img/icons/facebook.svg"></md-icon>
</md-button>
<md-button aria-label="Google hangout" class="md-fab md-raised md-mini">
<md-button aria-label="Google Hangout" class="md-fab md-raised md-mini">
<md-icon md-svg-src="img/icons/hangout.svg"></md-icon>
</md-button>
</md-fab-actions>
Expand Down
35 changes: 35 additions & 0 deletions src/components/fabSpeedDial/demoTooltips/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<div ng-controller="AppCtrl" layout="column">
<md-content class="md-padding" layout="column">
<p>
You may add tooltips to both the trigger and actions.
</p>

<div class="lock-size" layout="row" layout-align="center center">
<md-fab-speed-dial md-direction="down" class="md-fling">
<md-fab-trigger>
<md-button aria-label="menu" class="md-fab md-warn">
<md-tooltip md-direction="top">Menu</md-tooltip>
<md-icon md-svg-src="img/icons/menu.svg"></md-icon>
</md-button>
</md-fab-trigger>

<md-fab-actions>
<md-button aria-label="twitter" class="md-fab md-raised md-mini">
<md-tooltip md-direction="left">Twitter</md-tooltip>
<md-icon md-svg-src="img/icons/twitter.svg"></md-icon>
</md-button>

<md-button aria-label="facebook" class="md-fab md-raised md-mini">
<md-tooltip md-direction="right">Facebook</md-tooltip>
<md-icon md-svg-src="img/icons/facebook.svg"></md-icon>
</md-button>

<md-button aria-label="Google Hangout" class="md-fab md-raised md-mini">
<md-tooltip md-direction="left">Google Hangout</md-tooltip>
<md-icon md-svg-src="img/icons/hangout.svg"></md-icon>
</md-button>
</md-fab-actions>
</md-fab-speed-dial>
</div>
</md-content>
</div>
9 changes: 9 additions & 0 deletions src/components/fabSpeedDial/demoTooltips/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
(function() {
'use strict';

angular.module('fabSpeedDialTooltipDemo', ['ngMaterial'])
.controller('AppCtrl', function($scope) {
$scope.demo = {
};
});
})();
20 changes: 20 additions & 0 deletions src/components/fabSpeedDial/demoTooltips/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.text-capitalize {
text-transform: capitalize;
}

.md-fab:hover, .md-fab.md-focused {
background-color: #000 !important;
}

p.note {
font-size: 1.2rem;
}

.lock-size {
min-width: 300px;
min-height: 300px;
width: 300px;
height: 300px;
margin-left: auto;
margin-right: auto;
}

0 comments on commit a5807e0

Please sign in to comment.