(props: ConversationTabProps)
| 15 | } |
| 16 | |
| 17 | const ConversationTab = (props: ConversationTabProps) => { |
| 18 | const { conversation, selected, onClick, onEdit, onDelete } = props; |
| 19 | const { t } = useTranslation(); |
| 20 | |
| 21 | return ( |
| 22 | <div |
| 23 | className={`shrink-0 flex flex-row justify-center items-center cursor-pointer text-sm border pl-4 pr-2 py-1 rounded-sm text-gray-600 dark:text-gray-400 hover:text-gray-700 hover:bg-gray-50 dark:hover:bg-zinc-700 dark:border-zinc-700 ${ |
| 24 | selected && "!border-zinc-700 dark:!border-gray-200 shadow" |
| 25 | }`} |
| 26 | onClick={() => onClick(conversation)} |
| 27 | > |
| 28 | <span>{conversation.title}</span> |
| 29 | <Dropdown |
| 30 | tigger={ |
| 31 | <button className="w-4 h-auto shrink-0 ml-1 flex justify-center items-center text-gray-300 hover:opacity-80"> |
| 32 | <Icon.FiMoreVertical className="w-full h-auto" /> |
| 33 | </button> |
| 34 | } |
| 35 | > |
| 36 | <div className="p-1 flex flex-col justify-start items-start bg-white dark:bg-zinc-900 shadow-lg rounded-lg"> |
| 37 | <DropdownItem |
| 38 | className="w-full p-1 px-2 flex flex-row justify-start items-center rounded-lg cursor-pointer hover:bg-gray-100 dark:hover:bg-zinc-800" |
| 39 | onClick={() => onEdit(conversation)} |
| 40 | > |
| 41 | <Icon.FiEdit3 className="w-4 h-auto mr-2 opacity-70" /> |
| 42 | {t("common.edit")} |
| 43 | </DropdownItem> |
| 44 | <DropdownItem |
| 45 | className="w-full p-1 px-2 flex flex-row justify-start items-center rounded-lg cursor-pointer hover:bg-gray-100 dark:hover:bg-zinc-800" |
| 46 | onClick={() => onDelete(conversation)} |
| 47 | > |
| 48 | <Icon.IoTrash className="w-4 h-auto mr-2 opacity-70" /> |
| 49 | {t("common.delete")} |
| 50 | </DropdownItem> |
| 51 | </div> |
| 52 | </Dropdown> |
| 53 | </div> |
| 54 | ); |
| 55 | }; |
| 56 | |
| 57 | const ConversationTabsView = () => { |
| 58 | const { t } = useTranslation(); |
nothing calls this directly
no outgoing calls
no test coverage detected