UNPKG

1.23 kBJavaScriptView Raw
1import React from 'react';
2import { action } from '@storybook/addon-actions';
3import { ActionBar } from './ActionBar';
4var action1 = action('action1');
5var action2 = action('action2');
6var action3 = action('action3');
7export default {
8 component: ActionBar,
9 title: 'Basics/ActionBar',
10 decorators: [function (storyFn) {
11 return /*#__PURE__*/React.createElement("div", {
12 style: {
13 position: 'relative',
14 width: '300px',
15 height: '64px',
16 margin: '1rem',
17 background: 'papayawhip',
18 border: '1px solid rgba(0,0,0,.05)'
19 }
20 }, storyFn());
21 }]
22};
23export var singleItem = function singleItem() {
24 return /*#__PURE__*/React.createElement(ActionBar, {
25 actionItems: [{
26 title: 'Clear',
27 onClick: action1
28 }]
29 });
30};
31singleItem.displayName = "singleItem";
32export var manyItems = function manyItems() {
33 return /*#__PURE__*/React.createElement(ActionBar, {
34 actionItems: [{
35 title: 'Action string',
36 onClick: action1
37 }, {
38 title: /*#__PURE__*/React.createElement("div", null, "Action node"),
39 onClick: action2
40 }, {
41 title: 'Long action string',
42 onClick: action3
43 }]
44 });
45};
46manyItems.displayName = "manyItems";
\No newline at end of file