mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 12:56:00 +00:00
expand icon simplified
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
<script>
|
||||
import FontIcon from './FontIcon.svelte';
|
||||
|
||||
export let isBlank = false;
|
||||
export let isExpanded = false;
|
||||
</script>
|
||||
|
||||
{#if isBlank}
|
||||
<FontIcon icon="icon invisible-box" {...$$props} />
|
||||
{:else}
|
||||
<FontIcon icon={isExpanded ? 'icon minus-box' : 'icon plus-box'} {...$$props} />
|
||||
{/if}
|
||||
7
packages/web/src/icons/expandIcons.ts
Normal file
7
packages/web/src/icons/expandIcons.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export function plusExpandIcon(isExpanded) {
|
||||
return isExpanded ? 'icon minus-box' : 'icon plus-box';
|
||||
}
|
||||
|
||||
export function chevronExpandIcon(isExpanded) {
|
||||
return isExpanded ? 'icon chevron-down' : 'icon chevron-right';
|
||||
}
|
||||
Reference in New Issue
Block a user