diff --git a/package.json b/package.json index 3633807..de6e495 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@internxt/ui", - "version": "0.1.23", + "version": "0.1.24", "description": "Library of Internxt components", "repository": { "type": "git", diff --git a/src/components/mail/cheaps/MessageCheap.tsx b/src/components/mail/cheaps/MessageCheap.tsx index 1488c56..50240f4 100644 --- a/src/components/mail/cheaps/MessageCheap.tsx +++ b/src/components/mail/cheaps/MessageCheap.tsx @@ -1,4 +1,5 @@ import { Avatar } from '@/components/avatar'; +import { Checkbox } from '@/components/checkbox'; export interface MessageCheapProps { email: { @@ -15,18 +16,39 @@ export interface MessageCheapProps { active?: boolean; selected?: boolean; onClick: (id: string, isRead?: boolean) => void; + onSelect?: (id: string) => void; } -const MessageCheap = ({ email, active, selected, onClick }: MessageCheapProps) => { +const MessageCheap = ({ email, active, selected, onClick, onSelect }: MessageCheapProps) => { const isHighlighted = active || selected; + const handleSelect: React.MouseEventHandler = (e) => { + e.stopPropagation(); + onSelect?.(email.id); + }; + return ( @@ -263,7 +257,7 @@ exports[`Sidenav Component > should match snapshot 1`] = ` data-cy="inbox" >
should match snapshot 1`] = `

should match snapshot 1`] = ` data-cy="sent" >

should match snapshot 1`] = ` Sent

-
@@ -461,7 +449,7 @@ exports[`Sidenav Component > should match snapshot when collapsed 1`] = ` title="Inbox" >
should match snapshot when collapsed 1`] = `