Skip to content

Commit

Permalink
Update hbs templates to work with newer releases of ember
Browse files Browse the repository at this point in the history
  • Loading branch information
francois2metz committed Jul 17, 2023
1 parent a91b5d2 commit ab9606d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions code/frameworks/ember/template/cli/Button.stories.js
Expand Up @@ -6,7 +6,7 @@ import { linkTo } from '@storybook/addon-links';
export default {
title: 'Example/Button',
render: (args) => ({
template: hbs`<button {{action onClick}}>{{label}}</button>`,
template: hbs`<button {{action this.onClick}}>{{this.label}}</button>`,
context: args,
}),
argTypes: {
Expand All @@ -27,13 +27,14 @@ export const Text = {
export const Emoji = {
args: {
label: '😀 😎 👍 💯',
onClick: action('onClick'),
},
};

export const TextWithAction = {
render: () => ({
template: hbs`
<button {{action onClick}}>
<button {{action this.onClick}}>
Trigger Action
</button>
`,
Expand All @@ -50,12 +51,12 @@ export const TextWithAction = {
export const ButtonWithLinkToAnotherStory = {
render: () => ({
template: hbs`
<button {{action onClick}}>
<button {{action this.onClick}}>
Go to Welcome Story
</button>
`,
context: {
onClick: linkTo('Example/Introduction'),
onClick: linkTo('Configure your project'),
},
}),
name: 'button with link to another story',
Expand Down

0 comments on commit ab9606d

Please sign in to comment.