Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds an example of a boolean knob #6242

Merged
merged 2 commits into from Mar 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -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
@@ -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