Adding new index and story files

This commit is contained in:
Keith Stevens
2023-01-16 18:53:11 +09:00
parent a2f68c7259
commit 68f22d0fa9
3 changed files with 34 additions and 0 deletions
@@ -0,0 +1 @@
export * from "./LabelTask";
@@ -0,0 +1,32 @@
import React from "react";
import { Task } from "./Task";
export default {
title: "tasks/Task",
component: Task,
};
const Template = ({ frontendId, task, trigger, mutate }) => {
return <Task frontendId={frontendId} task={task} trigger={trigger} mutate={mutate} />;
};
export const Default = Template.bind({});
Default.args = {
frontendId: "1234",
task: {
conversation: [],
id: "1234-4321",
mandatory_labels: ["spam"],
message_id: "772f843e-f740-4aad-a44f-e3cf0260692c",
reply: "1231231231",
type: "label_prompter_reply",
valid_labels: ["spam", "fails_task"],
},
trigger: (id, update_type, content) => {
console.log(content);
},
mutate: () => {
console.log(mutate);
},
};
@@ -0,0 +1 @@
export * from "./Task";