From fcfcc4e42acba3d0e0afeb747bff7f4ef5b585fc Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Wed, 3 Nov 2021 13:12:04 -0400 Subject: [PATCH] chore: convert LinkButton to template-only --- .../components/rose/link-button/index.hbs | 55 +++++++++++-------- .../components/rose/link-button/index.js | 26 --------- .../rose/tests/dummy/app/templates/index.hbs | 4 ++ 3 files changed, 35 insertions(+), 50 deletions(-) delete mode 100644 addons/rose/addon/components/rose/link-button/index.js diff --git a/addons/rose/addon/components/rose/link-button/index.hbs b/addons/rose/addon/components/rose/link-button/index.hbs index 20ea6c6a5..c7cc9b387 100644 --- a/addons/rose/addon/components/rose/link-button/index.hbs +++ b/addons/rose/addon/components/rose/link-button/index.hbs @@ -1,26 +1,33 @@ - - {{#if @iconLeft}} - - {{/if}} + + + {{#if @iconLeft}} + + {{/if}} - - {{yield}} + + {{yield}} + + + {{#if @iconOnly}} + + {{/if}} + + {{#if @iconRight}} + + {{/if}} - - {{#if @iconOnly}} - - {{/if}} - - {{#if @iconRight}} - - {{/if}} - + diff --git a/addons/rose/addon/components/rose/link-button/index.js b/addons/rose/addon/components/rose/link-button/index.js deleted file mode 100644 index 97f6601ba..000000000 --- a/addons/rose/addon/components/rose/link-button/index.js +++ /dev/null @@ -1,26 +0,0 @@ -import LinkComponent from '@ember/routing/link-component'; -import layout from './index'; -import { computed } from '@ember/object'; - -/** - * An achor element based on `rose-button` component styles - * An empty model cannot be passed in to `link-to` component when a route - * is defined. Thus, `link-to` component is used to generate this component. - * - * @example - * Save - * Disabled - */ -export default LinkComponent.extend({ - layout, - classNames: ['rose-link-button'], - classNameBindings: [ - 'linkButtonStyle', - 'iconOnly:has-icon-only', - 'iconLeft:has-icon-left', - 'iconRight:has-icon-right', - ], - linkButtonStyle: computed(function () { - return this.style ? `rose-button-${this.style}` : ''; - }), -}); diff --git a/addons/rose/tests/dummy/app/templates/index.hbs b/addons/rose/tests/dummy/app/templates/index.hbs index 812e1ef45..3ead31307 100644 --- a/addons/rose/tests/dummy/app/templates/index.hbs +++ b/addons/rose/tests/dummy/app/templates/index.hbs @@ -1,3 +1,7 @@ + + Content + +

Checkbox Group