mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-07-01 16:50:12 +08:00
Adding new index and story files
This commit is contained in:
@@ -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";
|
||||
Reference in New Issue
Block a user