diff --git a/addons/rose/addon/components/rose/dropdown/index.hbs b/addons/rose/addon/components/rose/dropdown/index.hbs index 5d02e87e8..d3679b3a6 100644 --- a/addons/rose/addon/components/rose/dropdown/index.hbs +++ b/addons/rose/addon/components/rose/dropdown/index.hbs @@ -18,6 +18,9 @@ {{@text}} + {{#if @count}} + {{@count}} + {{/if}} diff --git a/addons/rose/addon/components/rose/dropdown/index.stories.mdx b/addons/rose/addon/components/rose/dropdown/index.stories.mdx index 1f3545707..129302461 100644 --- a/addons/rose/addon/components/rose/dropdown/index.stories.mdx +++ b/addons/rose/addon/components/rose/dropdown/index.stories.mdx @@ -1,6 +1,6 @@ import { Meta, Story, Preview } from '@storybook/addon-docs/blocks'; import { hbs } from 'ember-cli-htmlbars'; -import { boolean } from '@storybook/addon-knobs'; +import { number, boolean } from '@storybook/addon-knobs'; @@ -11,7 +11,7 @@ A simple dropdown component with support for links and buttons. {{ template: hbs` - + Menu item Menu item @@ -23,6 +23,7 @@ A simple dropdown component with support for links and buttons. `, context: { + count: number('count', 0), showCaret: boolean('showCaret', true), }, }} diff --git a/addons/rose/addon/styles/rose/components/dropdown/_dropdown.scss b/addons/rose/addon/styles/rose/components/dropdown/_dropdown.scss index b8f3450f4..785708943 100644 --- a/addons/rose/addon/styles/rose/components/dropdown/_dropdown.scss +++ b/addons/rose/addon/styles/rose/components/dropdown/_dropdown.scss @@ -39,6 +39,11 @@ $chevronGrey: url("data:image/svg+xml;utf-8,`); + assert.equal(find('.rose-badge').textContent.trim(), '2'); + }); + test('it supports an icon', async function (assert) { await render( hbs``