Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/modules/GroupChannel/components/SuggestedReplies/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@
}

.sendbird-suggested-replies__option {
white-space: nowrap;
height: 32px;
white-space: pre-wrap;
font-size: 12px;
padding: 0 14px;
padding: 8px 14px;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There could be extra padding(or margin) in Widget which used to be covering this. If so, please remove it :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no widget now uses UIKit SR so no problem

display: flex;
align-items: center;
border-radius: 18px;
cursor: pointer;
word-break: break-word;
@include themed() {
color: t(primary--3-2);
border: 1px solid t(primary--3-2);
Expand All @@ -71,4 +71,10 @@
color: t(bg-0);
}
}
&.horizontal {
white-space: nowrap;
}
&.vertical {
white-space: pre-wrap;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ export interface SuggestedRepliesProps {
export interface ReplyItemProps {
value: string;
onClickReply: (event: React.MouseEvent<HTMLDivElement>, option: string) => void;
type?: 'vertical' | 'horizontal';
}

export const ReplyItem = ({
value,
onClickReply,
type = 'vertical',
}: ReplyItemProps) => {
return (
<div
className="sendbird-suggested-replies__option"
className={`sendbird-suggested-replies__option ${type}`}
id={value}
onClick={(e) => onClickReply(e, value)}
>
Expand All @@ -46,7 +48,7 @@ const SuggestedReplies = ({ replyOptions, onSendMessage, type = 'vertical' }: Su

const children = replyOptions.map((option: string, index: number) => {
return (
<ReplyItem key={index} value={option} onClickReply={onClickReply}/>
<ReplyItem key={index} value={option} onClickReply={onClickReply} type={type} />
);
});

Expand Down