Skip to content

Commit

Permalink
Merge pull request #6242 from joefraley/patch-3
Browse files Browse the repository at this point in the history
adds an example of a boolean knob
  • Loading branch information
ndelangen authored Mar 25, 2019
2 parents 2745e2d + 5091cd2 commit a629510
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="banner" style="background-color:{{backgroundColor}}">
<div class="banner" style="background-color:{{backgroundColor}};{{style}}">
<h1 class="banner-header" style="color:{{titleColor}};">{{title}}</h1>
<p class="banner-subtitle" style="color:{{subTitleColor}}">
{{subtitle}}
Expand Down
4 changes: 3 additions & 1 deletion examples/ember-cli/stories/addon-knobs.stories.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import hbs from 'htmlbars-inline-precompile';
import { storiesOf } from '@storybook/ember';
import { withKnobs, text, color } from '@storybook/addon-knobs';
import { withKnobs, text, color, boolean } from '@storybook/addon-knobs';
import { action } from '@storybook/addon-actions';

storiesOf('Addon|Knobs', module)
Expand All @@ -9,6 +9,7 @@ storiesOf('Addon|Knobs', module)
.add('with text', () => ({
template: hbs`
{{welcome-banner
style=(if hidden "display: none")
backgroundColor=backgroundColor
titleColor=titleColor
subTitleColor=subTitleColor
Expand All @@ -18,6 +19,7 @@ storiesOf('Addon|Knobs', module)
}}
`,
context: {
hidden: boolean('hidden', false),
backgroundColor: color('backgroundColor', '#FDF4E7'),
titleColor: color('titleColor', '#DF4D37'),
subTitleColor: color('subTitleColor', '#B8854F'),
Expand Down

0 comments on commit a629510

Please sign in to comment.