diff --git a/lib/Comment/CommentForm.tsx b/lib/Comment/CommentForm.tsx index 63de6fca5..194dd5955 100644 --- a/lib/Comment/CommentForm.tsx +++ b/lib/Comment/CommentForm.tsx @@ -1,15 +1,15 @@ -import React, { useState, useRef, useContext, useEffect } from "react"; +import React, { useContext, useEffect, useRef, useState } from "react"; // @ts-expect-error TS(7016): Could not find a declaration file for module 'reac... Remove this comment to see the full error message import { Mention, MentionsInput } from "react-mentions"; import cx from "classnames"; import { - Comment, Avatar, AvatarInformation, - ShortcutTrigger, ButtonPrimary, - useLoader, ButtonTertiary, + Comment, + ShortcutTrigger, + useLoader, } from "lib"; import Icon from "../Icon"; import { CommentFailed } from "./CommentFailed"; @@ -137,6 +137,7 @@ function CommentForm({ )} diff --git a/lib/UserSearch/UserSearchList.tsx b/lib/UserSearch/UserSearchList.tsx index 06acc76e3..7951855c4 100644 --- a/lib/UserSearch/UserSearchList.tsx +++ b/lib/UserSearch/UserSearchList.tsx @@ -40,6 +40,7 @@ function UserSearchList({ name={user.name} /> } + pending={user.pending} /> diff --git a/stories/components/UserSearch.stories.tsx b/stories/components/UserSearch.stories.tsx index 1272141bf..cd0e58363 100644 --- a/stories/components/UserSearch.stories.tsx +++ b/stories/components/UserSearch.stories.tsx @@ -1,54 +1,61 @@ -import React from 'react'; -import { UserSearch as UserSearchComponent } from '../../lib'; -import StoryItem from '../styleguide/StoryItem'; +import React from "react"; +import { UserSearch as UserSearchComponent } from "../../lib"; +import StoryItem from "../styleguide/StoryItem"; const mockUser = { id: 2, - name: 'Bruce', + name: "Bruce", avatar: - 'https://gathercontent-production-avatars.s3-us-west-2.amazonaws.com/208205_yHGd7vA5HRxsnMQpES4UzjJ7Yxgn6Bp54165gqksRXyDJhuOnW88H6djhLJeE2BZ.jpg', - initials: 'BB', - display: 'brucebanner', - email: 'bruce@bruce.com' + "https://gathercontent-production-avatars.s3-us-west-2.amazonaws.com/208205_yHGd7vA5HRxsnMQpES4UzjJ7Yxgn6Bp54165gqksRXyDJhuOnW88H6djhLJeE2BZ.jpg", + initials: "BB", + display: "brucebanner", + email: "bruce@bruce.com", }; const mockUsers = [ mockUser, { - id: 'saul', - display: 'saulgoodman', - name: 'Saul Goodman', - initials: 'SG', - email: 'heythere@lol.com' + id: 1337, + name: "Alan Turing", + initials: "AT", + display: "Alan T.", + email: "the-enigma@example.com", + pending: "true", }, { - id: '456', - display: 'jessepinkman', - name: 'Jesse Pinkman', - email: 'heythere@lol.com', - initials: 'JP', - url: - 'https://d3iw72m71ie81c.cloudfront.net/2eae47ef-6f37-46fe-a02b-52cff401a8f9-me.jpg' - } + id: "saul", + display: "saulgoodman", + name: "Saul Goodman", + initials: "SG", + email: "heythere@lol.com", + }, + { + id: "456", + display: "jessepinkman", + name: "Jesse Pinkman", + email: "heythere@lol.com", + initials: "JP", + url: "https://d3iw72m71ie81c.cloudfront.net/2eae47ef-6f37-46fe-a02b-52cff401a8f9-me.jpg", + }, ]; export default { - title: 'Legacy/User Search', + title: "Legacy/User Search", component: UserSearchComponent, args: { displayEmail: true, useDisplayToggle: false, - subheading: '', - noUserDisplay: 'Looks like there are no people!', - searchHeading: 'Search...', - minUserLength: 0 + subheading: "", + noUserDisplay: "Looks like there are no people!", + searchHeading: "Search...", + minUserLength: 0, }, argTypes: { - addUser: { action: 'User was clicked' } - } + addUser: { action: "User was clicked" }, + }, }; -export const UserSearch = (args: any) => { +export function UserSearch(args: any) { return (
{ >
); -}; +}