Skip to content

Commit

Permalink
fixes: move jsdoc def to top of component signature
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Scully authored and Sean Scully committed Feb 9, 2024
1 parent ce36854 commit 6d4b199
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 31 deletions.
50 changes: 24 additions & 26 deletions packages/frontend-design-poc/src/components/InboxItem/InboxItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,30 @@ import classNames from "classnames";

import styles from "./inboxItem.module.css";

interface Participant {
label: string;
icon?: JSX.Element;
}

interface InboxItemTag {
label: string;
icon?: JSX.Element;
className?: string;
}

interface InboxItemProps {
checkboxValue: string;
title: string;
toLabel: string;
description: string;
sender: Participant;
receiver: Participant;
isChecked: boolean;
onCheckedChange: (value: boolean) => void;
tags?: InboxItemTag[];
isUnread?: boolean;
}

/**
* Represents an individual inbox item, displaying information such as the title,
* description, sender, and receiver, along with optional tags. It includes a checkbox
Expand Down Expand Up @@ -37,32 +61,6 @@ import styles from "./inboxItem.module.css";
* isUnread
* />
*/


interface Participant {
label: string;
icon?: JSX.Element;
}

interface InboxItemTag {
label: string;
icon?: JSX.Element;
className?: string;
}

interface InboxItemProps {
checkboxValue: string;
title: string;
toLabel: string;
description: string;
sender: Participant;
receiver: Participant;
isChecked: boolean;
onCheckedChange: (value: boolean) => void;
tags?: InboxItemTag[];
isUnread?: boolean;
}

export const InboxItem = ({
title,
description,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import styles from "./inboxItems.module.css";

export interface InboxItemsProps {
children: React.ReactNode;
}

/**
* A container component for displaying a list of inbox items. It serves as a wrapper
* for individual `InboxItem` components, ensuring they are styled and organized collectively.
Expand All @@ -20,11 +24,6 @@ import styles from "./inboxItems.module.css";
* </InboxItems>
*/


export interface InboxItemsProps {
children: React.ReactNode;
}

export const InboxItems = ({ children }: InboxItemsProps) => {
return <div className={styles.inboxItems}>{children}</div>;
};

0 comments on commit 6d4b199

Please sign in to comment.