UI - МЕЖПРОЕКТНАЯ КОММУНИКАЦИЯ: исправление ширины карточек внешних контуров
This commit is contained in:
@@ -27,10 +27,11 @@ export type TIssueSubscription = {
|
||||
issueId: string;
|
||||
serviceType?: EIssueServiceType;
|
||||
buttonClassName?: string;
|
||||
iconOnly?: boolean;
|
||||
};
|
||||
|
||||
export const IssueSubscription = observer(function IssueSubscription(props: TIssueSubscription) {
|
||||
const { workspaceSlug, projectId, issueId, serviceType = EIssueServiceType.ISSUES, buttonClassName } = props;
|
||||
const { workspaceSlug, projectId, issueId, serviceType = EIssueServiceType.ISSUES, buttonClassName, iconOnly = false } = props;
|
||||
const { t } = useTranslation();
|
||||
// hooks
|
||||
const {
|
||||
@@ -77,7 +78,7 @@ export const IssueSubscription = observer(function IssueSubscription(props: TIss
|
||||
if (isNil(isSubscribed))
|
||||
return (
|
||||
<Loader>
|
||||
<Loader.Item width="106px" height="28px" />
|
||||
<Loader.Item width={iconOnly ? "40px" : "106px"} height={iconOnly ? "40px" : "28px"} />
|
||||
</Loader>
|
||||
);
|
||||
|
||||
@@ -91,15 +92,16 @@ export const IssueSubscription = observer(function IssueSubscription(props: TIss
|
||||
disabled={!isEditable || loading}
|
||||
size="lg"
|
||||
>
|
||||
{loading ? (
|
||||
<span>
|
||||
<span className="hidden sm:block">{t("common.loading")}</span>
|
||||
</span>
|
||||
) : isSubscribed ? (
|
||||
<div className="hidden sm:block">{t("common.actions.unsubscribe")}</div>
|
||||
) : (
|
||||
<div className="hidden sm:block">{t("common.actions.subscribe")}</div>
|
||||
)}
|
||||
{!iconOnly &&
|
||||
(loading ? (
|
||||
<span>
|
||||
<span className="hidden sm:block">{t("common.loading")}</span>
|
||||
</span>
|
||||
) : isSubscribed ? (
|
||||
<div className="hidden sm:block">{t("common.actions.unsubscribe")}</div>
|
||||
) : (
|
||||
<div className="hidden sm:block">{t("common.actions.subscribe")}</div>
|
||||
))}
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -207,7 +207,8 @@ export const IssuePeekOverviewHeader = observer(function IssuePeekOverviewHeader
|
||||
workspaceSlug={workspaceSlug}
|
||||
projectId={projectId}
|
||||
issueId={issueId}
|
||||
buttonClassName="!h-10 rounded-[18px] border-transparent bg-layer-2/80 px-4 shadow-none backdrop-blur-xl hover:!bg-layer-2-active focus-visible:outline-none"
|
||||
iconOnly
|
||||
buttonClassName="size-10 rounded-[18px] border-transparent bg-layer-2/80 px-0 shadow-none backdrop-blur-xl hover:!bg-layer-2-active focus-visible:outline-none"
|
||||
/>
|
||||
)}
|
||||
<Tooltip tooltipContent={t("common.actions.copy_link")} isMobile={isMobile}>
|
||||
|
||||
Reference in New Issue
Block a user