Skip to content

Commit

Permalink
layout fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mrloureed committed Jul 24, 2023
1 parent efc1c27 commit 686214a
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 23 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@viamrobotics/prime",
"version": "0.3.5",
"version": "0.3.6",
"license": "Apache-2.0",
"type": "module",
"files": [
Expand Down
4 changes: 2 additions & 2 deletions src/elements/button/button.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ const handleParentClick = (event: PointerEvent) => {
event.stopImmediatePropagation();
};
let fill = 'danger';
let fill = 'black';
$: {
switch (variant) {
case 'inverse-primary':
case 'danger':
case 'success': {
fill = 'reversed';
fill = 'white';
break;
}
case 'outline-danger':
Expand Down
26 changes: 14 additions & 12 deletions src/elements/icon/icon.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,17 @@ export let size: Size = 'base';
const hasNameProperty = Object.hasOwn(paths, name);
</script>

<svg
class={cx(`leading ${sizes[size]}`, {
'inline-block': hasNameProperty,
hidden: !hasNameProperty,
})}
viewBox="0 0 24 24"
aria-labelledby="name"
role="img"
>
<title id={name}>{`${name} icon`}</title>
<path d={paths[name]} fill={fillColor[fill]} />
</svg>
<div class="leading-3">
<svg
class={cx(`${sizes[size]}`, {
'inline-block': hasNameProperty,
hidden: !hasNameProperty,
})}
viewBox="0 0 24 24"
aria-labelledby="name"
role="img"
>
<title id={name}>{`${name} icon`}</title>
<path d={paths[name]} fill={fillColor[fill]} />
</svg>
</div>
9 changes: 1 addition & 8 deletions src/elements/select/select.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -275,14 +275,7 @@ $: {

{#if tooltip}
<v-tooltip text={tooltip}>
<div
class={cx({
'text-warning-bright': state === 'warn',
'text-danger-dark': state === 'error',
})}
>
<v-icon {fill} name={icon} />
</div>
<v-icon {fill} name={icon} />
</v-tooltip>
{/if}
</div>
Expand Down

0 comments on commit 686214a

Please sign in to comment.