Skip to content

Commit

Permalink
Added circle icon.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Paterson committed Jan 23, 2019
1 parent 9255d77 commit 4fd67d8
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 1 deletion.
7 changes: 7 additions & 0 deletions addon/components/svg-repo/icons/icon-circle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Component from '@ember/component';
import layout from '../../../templates/components/svg-repo/icons/icon-circle';

export default Component.extend({
tagName: '',
layout
});
3 changes: 3 additions & 0 deletions addon/templates/components/svg-repo/icons/icon-circle.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2 2" class="{{class}} single-colour icon-ellipsis">
<circle cx="1" cy="1" r="1" />
</svg>
3 changes: 2 additions & 1 deletion addon/templates/components/svg-repo/icons/icon-ellipsis.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 252 62" class="{{class}} single-colour icon-ellipsis">
<circle cx="31" cy="31" r="31" class="first" />
<circle cx="126" cy="31" r="31" class="second" />
<circle cx="221" cy="31" r="31" class="third" /></svg>
<circle cx="221" cy="31" r="31" class="third" />
</svg>
1 change: 1 addition & 0 deletions app/components/svg-repo/icons/icon-circle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from 'svg-repo/components/svg-repo/icons/icon-circle';
26 changes: 26 additions & 0 deletions tests/integration/components/svg-repo/icons/icon-circle-test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';

module('Integration | Component | svg-repo/icons/icon-circle', function(hooks) {
setupRenderingTest(hooks);

test('it renders', async function(assert) {
// Set any properties with this.set('myProperty', 'value');
// Handle any actions with this.set('myAction', function(val) { ... });

await render(hbs`{{svg-repo/icons/icon-circle}}`);

assert.equal(this.element.textContent.trim(), '');

// Template block usage:
await render(hbs`
{{#svg-repo/icons/icon-circle}}
template block text
{{/svg-repo/icons/icon-circle}}
`);

assert.equal(this.element.textContent.trim(), 'template block text');
});
});

0 comments on commit 4fd67d8

Please sign in to comment.