Skip to content

Commit

Permalink
Add light prop to Link component to set text to off white
Browse files Browse the repository at this point in the history
  • Loading branch information
laurakwhit committed Jun 12, 2024
1 parent 7b367a7 commit a20eb71
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
{/if} -->
{:else if shouldDisplayAsExecutionLink(key)}
<Link
inverse
light
href={routeForEventHistory({
namespace,
workflow,
Expand All @@ -111,15 +111,15 @@
>
{:else if shouldDisplayChildWorkflowLink(key, attributes)}
<Link
inverse
light
href={routeForEventHistory({
namespace: attributes?.namespace || namespace,
workflow: attributes.workflowExecutionWorkflowId,
run: attributes.workflowExecutionRunId,
})}>{value}</Link
>
{:else if shouldDisplayAsTaskQueueLink(key)}
<Link inverse href={routeForTaskQueue({ namespace, queue: value })}
<Link light href={routeForTaskQueue({ namespace, queue: value })}
>{value}</Link
>
{:else}
Expand Down
10 changes: 5 additions & 5 deletions src/lib/holocene/link.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
class?: string;
icon?: IconName;
text?: string;
inverse?: boolean;
light?: boolean;
'data-testid'?: string;
};
Expand All @@ -27,7 +27,7 @@
export let newTab = false;
export let icon: IconName = null;
export let text: string = '';
export let inverse = false;
export let light = false;
const onLinkClick = (e: MouseEvent) => {
// Skip if middle mouse click or new tab
Expand All @@ -44,7 +44,7 @@
rel={newTab ? 'noreferrer' : null}
class={merge('link', icon ? 'inline-flex' : 'inline', className)}
class:active
class:inverse
class:light
on:click={onLinkClick}
tabindex={href ? null : 0}
{...$$restProps}
Expand All @@ -66,8 +66,8 @@
@apply text-brand;
}
&.inverse {
@apply text-inverse hover:text-brand focus-visible:text-brand;
&.light {
@apply text-off-white;
}
}
Expand Down

0 comments on commit a20eb71

Please sign in to comment.