-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(): Added iron-icons & key-pad-key
- Loading branch information
Alfredo De la calle
authored and
Alfredo De la calle
committed
Dec 16, 2016
1 parent
c1621a0
commit 7c447d3
Showing
7 changed files
with
217 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<dom-module id="key-pad-key-styles"> | ||
<template> | ||
<style> | ||
:host { | ||
|
||
} | ||
|
||
.key-pad-key__keyNums { | ||
@apply(--layout); | ||
@apply(--layout-wrap); | ||
} | ||
|
||
.key-pad-key__keyNum { | ||
flex: 1 0 33.3%; | ||
@apply(--layout); | ||
@apply(--layout-center-justified); | ||
} | ||
|
||
.key-pad-key__keyNum:nth-of-type(10) { | ||
flex-basis: 66.6%; | ||
@apply(--layout-end-justified); | ||
} | ||
|
||
.key-pad-key__keyNum-content { | ||
border: 1px solid #CCC; | ||
border-radius: 50%; | ||
text-align: center; | ||
margin: 10px 0; | ||
padding: 30px 0; | ||
width: 75px; | ||
} | ||
.key-pad-key__keyNum:nth-of-type(10) .key-pad-key__keyNum-content { | ||
margin-right: 20px; | ||
} | ||
|
||
.key-pad-key__keyNum-content:hover { | ||
cursor: pointer; | ||
background-color: #CCC; | ||
} | ||
</style> | ||
</template> | ||
</dom-module> | ||
|
||
<dom-module id="key-pad-key-animations"> | ||
<template> | ||
<style></style> | ||
</template> | ||
</dom-module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<link rel="import" href="../polymer/polymer.html"> | ||
<link rel="import" href="../iron-flex-layout/iron-flex-layout.html"> | ||
<link rel="import" href="../iron-icons/maps-icons.html"> | ||
|
||
<link rel="import" href="key-pad-key-styles.html"> | ||
<!-- | ||
`key-pad-key` | ||
A custom UI keypad | ||
@demo demo/index.html | ||
--> | ||
<dom-module id="key-pad-key"> | ||
<style include="key-pad-key-styles key-pad-key-animations"></style> | ||
<template> | ||
<div class$="key-pad-key__keyNum key-pad-key__[[ label ]]" | ||
on-tap="_onTapKey"> | ||
<div class="key-pad-key__keyNum-content"> | ||
[[ label ]] | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
'use strict'; | ||
|
||
Polymer({ | ||
is: 'key-pad-key', | ||
properties: { | ||
key: { | ||
type: String | ||
}, | ||
label: { | ||
type: String | ||
} | ||
}, | ||
ready: function() { | ||
if (!this.label) { | ||
this.set('label', this.key); | ||
} | ||
}, | ||
|
||
_onTapKey: function(evt) { | ||
this.fire('key-pad-key.key', evt.model.key); | ||
console.log('key-pad-key.key', evt.model.key); | ||
} | ||
}) | ||
</script> | ||
</dom-module> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters