Skip to content

Commit

Permalink
fix: current identifier button overflowing on long values (#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-jonas authored Nov 26, 2024
1 parent cfebb19 commit 286014a
Showing 1 changed file with 15 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,20 @@ export function DefaultCurrentIdentifierButton() {
])

return (
<div>
<a
className="cursor-pointer py-[5px] px-3 rounded-full border border-button-identifier-border-default bg-button-identifier-bg-default hover:border-button-identifier-border-hover hover:bg-button-identifier-bg-hover transition-colors inline-flex gap-1 items-center"
{...attributes}
href={initFlowUrl}
title={`Adjust ${nodeBackButton?.attributes.value}`}
>
<IconArrowLeft size={16} className="text-button-identifier-fg-subtle" />
<span className="text-sm font-medium text-button-identifier-fg-default text-ellipsis overflow-hidden text-nowrap">
{nodeBackButton?.attributes.value}
</span>
</a>
</div>
<a
className="cursor-pointer py-[5px] px-3 rounded-full border border-button-identifier-border-default bg-button-identifier-bg-default hover:border-button-identifier-border-hover hover:bg-button-identifier-bg-hover transition-colors inline-flex gap-1 items-center self-start max-w-full"
{...attributes}
href={initFlowUrl}
title={`Adjust ${nodeBackButton?.attributes.value}`}
>
<IconArrowLeft
size={16}
className="text-button-identifier-fg-subtle shrink-0"
/>
<span className="text-sm font-medium text-button-identifier-fg-default text-ellipsis overflow-hidden text-nowrap">
{nodeBackButton?.attributes.value}
</span>
</a>
)
}

Expand All @@ -60,7 +61,7 @@ export function getBackButtonNode(
(node) =>
"name" in node.attributes &&
node.attributes.name === "identifier" &&
node.group === "identifier_first",
["default", "identifier_first"].includes(node.group),
)
break
case FlowType.Registration:
Expand Down

0 comments on commit 286014a

Please sign in to comment.