Comment Button: Fix with tall action buttons (#5679)
This commit is contained in:
parent
87fc3a832f
commit
6af0b0eb11
@ -111,6 +111,22 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.as-action-button {
|
||||||
|
position: static;
|
||||||
|
background-color: transparent;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: rgba(255, 255, 255, 0.08);
|
||||||
|
backdrop-filter: none;
|
||||||
|
filter: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
top: 1.5rem;
|
||||||
|
bottom: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: var(--hover-color);
|
background: var(--hover-color);
|
||||||
|
|
||||||
|
|||||||
@ -24,6 +24,7 @@ type OwnProps = {
|
|||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
isLoading?: boolean;
|
isLoading?: boolean;
|
||||||
isCustomShape?: boolean;
|
isCustomShape?: boolean;
|
||||||
|
asActionButton?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
const SHOW_LOADER_DELAY = 450;
|
const SHOW_LOADER_DELAY = 450;
|
||||||
@ -33,6 +34,7 @@ const CommentButton: FC<OwnProps> = ({
|
|||||||
threadInfo,
|
threadInfo,
|
||||||
disabled,
|
disabled,
|
||||||
isLoading,
|
isLoading,
|
||||||
|
asActionButton,
|
||||||
}) => {
|
}) => {
|
||||||
const { openThread } = getActions();
|
const { openThread } = getActions();
|
||||||
|
|
||||||
@ -100,6 +102,7 @@ const CommentButton: FC<OwnProps> = ({
|
|||||||
disabled && 'disabled',
|
disabled && 'disabled',
|
||||||
isCustomShape && 'CommentButton-custom-shape',
|
isCustomShape && 'CommentButton-custom-shape',
|
||||||
isLoading && 'loading',
|
isLoading && 'loading',
|
||||||
|
asActionButton && 'as-action-button',
|
||||||
)}
|
)}
|
||||||
dir={lang.isRtl ? 'rtl' : 'ltr'}
|
dir={lang.isRtl ? 'rtl' : 'ltr'}
|
||||||
onClick={handleClick}
|
onClick={handleClick}
|
||||||
|
|||||||
@ -1625,6 +1625,15 @@ const Message: FC<OwnProps & StateProps> = ({
|
|||||||
isLoadingComments && 'message-action-buttons-shown',
|
isLoadingComments && 'message-action-buttons-shown',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
{withCommentButton && isCustomShape && (
|
||||||
|
<CommentButton
|
||||||
|
threadInfo={repliesThreadInfo}
|
||||||
|
disabled={noComments}
|
||||||
|
isLoading={isLoadingComments}
|
||||||
|
isCustomShape
|
||||||
|
asActionButton
|
||||||
|
/>
|
||||||
|
)}
|
||||||
{canForward && (
|
{canForward && (
|
||||||
<Button
|
<Button
|
||||||
className="message-action-button"
|
className="message-action-button"
|
||||||
@ -1651,12 +1660,11 @@ const Message: FC<OwnProps & StateProps> = ({
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{withCommentButton && (
|
{withCommentButton && !(canShowActionButton && isCustomShape) && (
|
||||||
<CommentButton
|
<CommentButton
|
||||||
threadInfo={repliesThreadInfo}
|
threadInfo={repliesThreadInfo}
|
||||||
disabled={noComments}
|
disabled={noComments}
|
||||||
isLoading={isLoadingComments}
|
isLoading={isLoadingComments}
|
||||||
isCustomShape={isCustomShape}
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{withAppendix && <MessageAppendix isOwn={isOwn} />}
|
{withAppendix && <MessageAppendix isOwn={isOwn} />}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user