Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
zaporter-work committed Sep 20, 2024
1 parent 38816ad commit fbf0fa9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 25 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.152",
"version": "0.0.153",
"repository": {
"type": "git",
"url": "https://github.com/viamrobotics/prime.git",
Expand Down
46 changes: 22 additions & 24 deletions packages/core/src/lib/badge.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,25 @@ let extraClasses: cx.Argument = '';
export { extraClasses as cx };
</script>

<div class="inline-block">
<small
class={cx(
'flex items-center gap-1 rounded-full border px-2.5 py-0.5 text-xs',
{
'border-success-medium bg-success-light text-success-dark':
variant === 'success',
'border-warning-medium bg-warning-light text-warning-dark':
variant === 'warning',
'border-danger-medium bg-danger-light text-danger-dark':
variant === 'danger',
'border-medium bg-disabled-light text-default': variant === 'inactive',
'border-info-medium bg-info-light text-info-dark':
variant === 'neutral' || variant === 'progress',
},
extraClasses
)}
>
{#if variant === 'progress'}
<Progress />
{/if}
{label}
</small>
</div>
<small
class={cx(
'inline-flex items-center gap-1 rounded-full border px-2.5 py-0.5 text-xs',
{
'border-success-medium bg-success-light text-success-dark':
variant === 'success',
'border-warning-medium bg-warning-light text-warning-dark':
variant === 'warning',
'border-danger-medium bg-danger-light text-danger-dark':
variant === 'danger',
'border-medium bg-disabled-light text-default': variant === 'inactive',
'border-info-medium bg-info-light text-info-dark':
variant === 'neutral' || variant === 'progress',
},
extraClasses
)}
>
{#if variant === 'progress'}
<Progress />
{/if}
{label}
</small>

0 comments on commit fbf0fa9

Please sign in to comment.