-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from nypublicradio/mwalsh/WE-6492_social-icon-…
…list Add nypr-social-icons component
- Loading branch information
Showing
8 changed files
with
82 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Ember from 'ember'; | ||
import layout from '../templates/components/nypr-social-icons'; | ||
|
||
export default Ember.Component.extend({ | ||
classNames: ["nypr-social-icons"], | ||
layout | ||
}); |
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,13 @@ | ||
<h3 class="nypr-social-icons__header">{{title}}</h3> | ||
{{yield}} | ||
<ul class="nypr-social-icons__list"> | ||
{{#each items as |item|}} | ||
<li class="nypr-social-icons__item"> | ||
<a class="nypr-social-icons__link" | ||
href="{{item.url}}" | ||
target="_blank"> | ||
<i class="nypr-social-icons__icon fa fa-{{item.icon}}"></i> | ||
</a> | ||
</li> | ||
{{/each}} | ||
</ul> |
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 @@ | ||
export { default } from 'nypr-ui/components/nypr-social-icons'; |
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,30 @@ | ||
@import 'nypr-ui/mixins/lists'; | ||
|
||
.nypr-social-icons { | ||
padding: 0 18px 26px 24px; | ||
text-align: right; | ||
} | ||
|
||
.nypr-social-icons__header { | ||
margin: 0; | ||
padding: 0 0 11px 0; | ||
font-size: 12px; | ||
font-weight: 600; | ||
color: #ffffff; | ||
} | ||
|
||
.nypr-social-icons__list { | ||
@include list-base; | ||
@include display-flex; | ||
@include justify-content(space-between); | ||
margin: 0; | ||
} | ||
|
||
.nypr-social-icons__link { | ||
&:hover, | ||
&:focus { | ||
text-decoration: none; | ||
border-bottom-color: transparent; | ||
color: rgba(white, 0.05); | ||
} | ||
} |
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,4 @@ | ||
@mixin list-base { | ||
list-style: none; | ||
padding: 0; | ||
} |
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,25 @@ | ||
import { moduleForComponent, test } from 'ember-qunit'; | ||
import hbs from 'htmlbars-inline-precompile'; | ||
|
||
moduleForComponent('nypr-social-icons', 'Integration | Component | nypr social icons', { | ||
integration: true | ||
}); | ||
|
||
test('it renders', function(assert) { | ||
|
||
// Set any properties with this.set('myProperty', 'value'); | ||
// Handle any actions with this.on('myAction', function(val) { ... }); | ||
|
||
this.render(hbs`{{nypr-social-icons}}`); | ||
|
||
assert.equal(this.$().text().trim(), ''); | ||
|
||
// Template block usage: | ||
this.render(hbs` | ||
{{#nypr-social-icons}} | ||
template block text | ||
{{/nypr-social-icons}} | ||
`); | ||
|
||
assert.equal(this.$().text().trim(), 'template block text'); | ||
}); |