diff --git a/addon/components/scrollable.hbs b/addon/components/scrollable.hbs deleted file mode 100644 index cd7b179..0000000 --- a/addon/components/scrollable.hbs +++ /dev/null @@ -1 +0,0 @@ -
{{yield}}
\ No newline at end of file diff --git a/addon/components/scrollable.js b/addon/components/scrollable.js deleted file mode 100644 index 1574844..0000000 --- a/addon/components/scrollable.js +++ /dev/null @@ -1,41 +0,0 @@ -import Component from '@glimmer/component'; -import { tracked } from '@glimmer/tracking'; -import { action } from '@ember/object'; - -export default class ScrollableComponent extends Component { - @tracked horizontal = false; - @tracked vertical = true; - @tracked nodeRef; - - @action setupComponent(element) { - const { onSetup, horizontal, vertical } = this.args; - - this.nodeRef = element; - this.horizontal = horizontal; - this.vertical = vertical; - - if (typeof onSetup === 'function') { - onSetup(...arguments); - } - - this.makeScrollable(element); - } - - @action makeScrollable(element) { - this.setComputedSize(element); - - const resizeObserver = new ResizeObserver(this.onResize); - resizeObserver.observe(element); - } - - @action setComputedSize(element) { - const { clientHeight } = element; - - element.style.height = `${clientHeight}px`; - element.style.overflowY = 'scroll'; - } - - @action onResize([entry]) { - // console.log('elemen has been resized! #entry', entry); - } -} diff --git a/tests/integration/components/scrollable-test.js b/tests/integration/components/scrollable-test.js deleted file mode 100644 index 65fbc7f..0000000 --- a/tests/integration/components/scrollable-test.js +++ /dev/null @@ -1,26 +0,0 @@ -import { module, test } from 'qunit'; -import { setupRenderingTest } from 'dummy/tests/helpers'; -import { render } from '@ember/test-helpers'; -import { hbs } from 'ember-cli-htmlbars'; - -module('Integration | Component | scrollable', 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``); - - assert.dom(this.element).hasText(''); - - // Template block usage: - await render(hbs` - - template block text - - `); - - assert.dom(this.element).hasText('template block text'); - }); -});