Skip to content

Commit

Permalink
APP-5548: allow breadcrumbs render in text-disabled (viamrobotics#539)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcous authored Jul 18, 2024
1 parent 36e33db commit 054f265
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@viamrobotics/prime-core",
"version": "0.0.130",
"version": "0.0.131",
"publishConfig": {
"access": "public"
},
Expand Down
17 changes: 10 additions & 7 deletions packages/core/src/lib/breadcrumbs.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--
@component
A navigation aid that helps users understand the relationships between parents and children.
```svelte
Expand All @@ -10,20 +10,23 @@ A navigation aid that helps users understand the relationships between parents a
<svelte:options immutable />

<script lang="ts">
import cx from 'classnames';
import classnames from 'classnames';
/** A list of each part. */
export let crumbs: [string, ...string[]];
/** Render the breadcrumbs as disabled. */
export let isDisabled = false;
/** Additional CSS classes to pass to the breadcrumbs container. */
let extraClasses: cx.Argument = '';
export { extraClasses as cx };
export let cx: classnames.Argument = '';
</script>

<div
class={cx(
'inline-flex gap-2.5 rounded-full border border-medium bg-light px-2.5 py-px text-default',
extraClasses
class={classnames(
'inline-flex gap-2.5 rounded-full border border-medium bg-light px-2.5 py-px',
isDisabled ? 'text-disabled' : 'text-default',
cx
)}
>
{#each crumbs as crumb, index (crumb)}
Expand Down

0 comments on commit 054f265

Please sign in to comment.