Skip to content

Commit

Permalink
v6/ Fixing storybook (#2543)
Browse files Browse the repository at this point in the history
  • Loading branch information
ribeiroguilherme authored Feb 8, 2024
1 parent 7144fb6 commit 8e67910
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/lib/storybook/helpers/checkout-handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ export function handleChange(state: any, _component: UIElement) {
console.groupCollapsed(`onChange - ${state.data.paymentMethod.type}`);
console.log('isValid', state.isValid);
console.log('data', state.data);
// @ts-ignore Logging internal data for testing purposes
console.log('node', component._node);
// @ts-ignore Logging internal prop
console.log('node', _component._node);
console.log('state', state);
console.groupEnd();
}
Expand Down
6 changes: 2 additions & 4 deletions packages/lib/storybook/stories/giftcards/GiftcardExample.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,13 @@ export const GiftcardExample = ({ contextArgs }: GiftcardExampleProps) => {
});

const onOrderUpdated = () => {
const card = new Card({
core: checkout.current,
const card = new Card(checkout.current, {
_disableClickToPay: true
});
setElement(card);
};

const giftcardElement = new Giftcard({
core: checkout.current,
const giftcardElement = new Giftcard(checkout.current, {
...contextArgs.componentConfiguration,
onOrderUpdated: onOrderUpdated
});
Expand Down

0 comments on commit 8e67910

Please sign in to comment.