2
import * as React from "react";
3
import { storiesOf } from "@storybook/react";
4
import ContactList from "../Components/ContactList/ContactList";
5
import { ContactTypes } from "../Domain/ContactType";
6
import { actionWithDelay } from "./StoryUtils";
7
import { contactConfigs } from "./Data/ContactConfigs";
10
contactDescriptions: contactConfigs,
11
onTestContact: actionWithDelay("onTestContact", 2000),
12
onRemoveContact: actionWithDelay("onRemoveContact", 2000),
13
onUpdateContact: actionWithDelay("onUpdateContact", 2000),
14
onAddContact: actionWithDelay("onAddContact", 2000),
17
storiesOf("ContactList", module)
18
.add("EmptyList", () => <ContactList {...commonProps} items={[]} />)
19
.add("Single_Email", () => (
25
type: ContactTypes.mail,
27
value: "test@mail.ru",
32
.add("Single_Pushover", () => (
38
type: ContactTypes.pushover,
40
value: "u13XsadLKJjh273jafksaja7asjdkds ",
45
.add("TwoItems", () => (
51
type: ContactTypes.pushover,
53
value: "u13XsadLKJjh273jafksaja7asjdkds ",
57
type: ContactTypes.mail,
59
value: "test@mail.ru",
64
.add("AllTypesItems", () => (
70
type: ContactTypes.pushover,
72
value: "u13XsadLKJjh273jafksaja7asjdkds ",
76
type: ContactTypes.mail,
78
value: "test@mail.ru",
82
type: ContactTypes.slack,
84
value: "test@mail.ru",
88
type: ContactTypes["twilio voice"],
90
value: "test@mail.ru",
94
type: ContactTypes.telegram,
96
value: "test@mail.ru",