woocommerce/plugins/woocommerce-admin/client/quick-links/stories/index.js

32 lines
671 B
JavaScript
Raw Normal View History

/**
* External dependencies
*/
import { withConsole } from '@storybook/addon-console';
/**
* Internal dependencies
*/
import QuickLinks from '..';
function logItemClick( listItemTag ) {
// eslint-disable-next-line no-console
console.log( `QuickLinks item with tag '${ listItemTag }' clicked` );
return false;
}
function getSetting() {
return 'https://example.com';
}
export default {
title: 'WooCommerce Admin/homepage/QuickLinks',
component: QuickLinks,
decorators: [ ( storyFn, context ) => withConsole()( storyFn )( context ) ],
};
export const Default = () => {
return (
<QuickLinks getSetting={ getSetting } onItemClick={ logItemClick } />
);
};