Open a finished Rule from its Profile card, and drop it from the browser on Log out.
This commit is contained in:
1 parent
db1599123b
commit
942c7cc9de
17 files changed
+280
-14
No files matched your search
@@ -36,6 +36,7 @@ const RuleContainer = memo<RuleProps>(
|
||||
className = "",
|
||||
onClick,
|
||||
href,
|
||||
ariaLabel: ariaLabelProp,
|
||||
expanded = false,
|
||||
size: sizeProp,
|
||||
categories,
|
||||
@@ -67,7 +68,11 @@ const RuleContainer = memo<RuleProps>(
|
||||
const size = sizeProp ?? "L";
|
||||
const isInteractive = interactive ?? !hasBottomLinks;
|
||||
const t = useTranslation("ruleCard");
|
||||
const cardAriaLabel = t("ariaLabel")?.replace("{title}", title) || title;
|
||||
const trimmedAriaLabel = ariaLabelProp?.trim() ?? "";
|
||||
const cardAriaLabel =
|
||||
trimmedAriaLabel.length > 0
|
||||
? trimmedAriaLabel
|
||||
: t("ariaLabel")?.replace("{title}", title) || title;
|
||||
const recommendedLabel = t("recommendedLabel");
|
||||
|
||||
const handleClick = () => {
|
||||
@@ -111,7 +116,7 @@ const RuleContainer = memo<RuleProps>(
|
||||
icon={icon}
|
||||
backgroundColor={backgroundColor}
|
||||
className={className}
|
||||
href={isInteractive && !hasBottomLinks ? href : undefined}
|
||||
href={href}
|
||||
onClick={isInteractive && !hasBottomLinks ? handleClick : undefined}
|
||||
onKeyDown={
|
||||
isInteractive && !hasBottomLinks && !href ? handleKeyDown : undefined
|
||||
|
||||
Reference in new issue
Block a user