Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: current identifier button overflowing on long values #295

Merged
merged 1 commit into from
Nov 26, 2024
Merged
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
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
Loading