Skip to content

Commit

Permalink
Update ItemHeaderView stories
Browse files Browse the repository at this point in the history
  • Loading branch information
campb303 committed Apr 14, 2021
1 parent 14f1d72 commit 0957555
Showing 1 changed file with 35 additions and 11 deletions.
46 changes: 35 additions & 11 deletions src/components/ItemHeaderView/ItemHeaderView.stories.mdx
Original file line number Diff line number Diff line change
@@ -1,16 +1,40 @@
import { Meta, Story, Canvas } from '@storybook/addon-docs/blocks';
import ItemHeaderView from './ItemHeaderView';
import { Meta, Story, Canvas, ArgsTable } from '@storybook/addon-docs/blocks';
import { Paper } from "@material-ui/core";
import ItemHeaderView from './ItemHeaderView';

The ItemHeader displays item metadata for items of selected queues and allows for filtering by field and opening an item by clicking. Items are passed in as a required parameter. It is to be used with the [ItemTableAppBar](/?path=/docs/components-itemtableappbar--default-story).
<Meta
title="Components/ItemHeaderView"
component={ItemHeaderView}
argTypes={{
data: {
control: {
type: "object"
}
}
}}
/>

It is based on [react-table](https://react-table.tanstack.com/).

<Meta title="Components/ItemHeaderView" component={ItemHeaderView} />
Renders a filterable table of Item headers and content. It is based on [react-table](https://react-table.tanstack.com/).

<Canvas>
<Story name="Default" args={{
data:[{"queue": "ce", "number": 9, "lastUpdated": "09-11-20 12:14 PM", "isLocked": false, "userEmail": "lslusher@purdue.edu", "userName": "Slusher, Laura M", "userAlias": "lslusher", "assignedTo": "bekuma", "subject": "RE: New laptop", "status": "waiting on reply/time to call", "priority": "deploy", "department": "che", "building": "frny", "dateReceived": "2020-03-12T18:07:27+0000"}, {"queue": "ce", "number": 42, "lastUpdated": "09-11-20 12:14 PM", "isLocked": false, "userEmail": "feng293@purdue.edu", "userName": "", "userAlias": "feng293", "assignedTo": "schmid22", "subject": "Upgrade system and Abaqus", "status": "", "priority": "", "department": "", "building": "", "dateReceived": "2020-05-14T10:21:32-0400"}, {"queue": "ce", "number": 51, "lastUpdated": "09-11-20 12:14 PM", "isLocked": false, "userEmail": "jclauso@purdue.edu", "userName": "", "userAlias": "jclauso", "assignedTo": "schmid22", "subject": "ECN privileges for future grad student", "status": "Waiting for reply", "priority": "", "department": "", "building": "", "dateReceived": "2020-05-14T15:03:07-0400"}]
}} >
{args => <ItemHeaderView {...args} />}
<Story
name="Default"
args={{
data: [
{"type": "Status-Updated-By", "content": "campb303"},
{"type": "Date", "content": "Tue, 23 Jun 2020 13:25:51 -0400"},
{"type": "From", "content": "Justin Campbell <campb303@purdue.edu>"},
{"type": "Message-ID", "content": "<911CE050-3240-4980-91DD-9C3EBB8DBCF8@purdue.edu>"},
{"type": "Subject", "content": "Beepboop"},
{"type": "To", "content": "cesite@ecn.purdue.edu"},
{"type": "Content-Type", "content": "text/plain; charset=\"utf-8\""},
{"type": "X-ECN-Queue-Original-Path", "content": "/home/pier/e/queue/Attachments/inbox/2020-06-23/208-original.txt"},
{"type": "X-ECN-Queue-Original-URL", "content": "https://engineering.purdue.edu/webqueue/Attachments/inbox/2020-06-23/208-original.txt"}
]
}}
>
{ args => <ItemHeaderView {...args} /> }
</Story>
</Canvas>
</Canvas>

<ArgsTable of={ItemHeaderView} />

0 comments on commit 0957555

Please sign in to comment.