feat: style impovements

This commit is contained in:
Arman
2023-08-09 17:45:53 +02:00
parent 6dd8807551
commit 97a978fb36
3 changed files with 35 additions and 8 deletions
+7 -1
View File
@@ -1,3 +1,9 @@
<ul class="secondary-tabs">
<script lang="ts">
export let large = false;
let classes: string = undefined;
export { classes as class };
</script>
<ul class="secondary-tabs {classes}" class:is-large={large}>
<slot />
</ul>
+20 -4
View File
@@ -1,21 +1,37 @@
<script lang="ts">
export let href: string = null;
export let disabled = false;
export let stretch = false;
export let fullWidth = false;
export let center = false;
</script>
<li class="secondary-tabs-item">
<li class="secondary-tabs-item" class:u-stretch={stretch}>
{#if href}
{#if disabled}
<button class="secondary-tabs-button" disabled>
<button
class="secondary-tabs-button"
class:u-width-full-line={fullWidth}
class:u-text-center={center}
disabled>
<span class="text"><slot /></span>
</button>
{:else}
<a class="secondary-tabs-button" {href}>
<a
class="secondary-tabs-button"
class:u-width-full-line={fullWidth}
class:u-text-center={center}
{href}>
<span class="text"><slot /></span>
</a>
{/if}
{:else}
<button class="secondary-tabs-button" {disabled} on:click>
<button
class="secondary-tabs-button"
class:u-width-full-line={fullWidth}
class:u-text-center={center}
{disabled}
on:click>
<span class="text"><slot /></span>
</button>
{/if}
@@ -99,10 +99,15 @@
>.
</Alert>
<div>
<SecondaryTabs>
<div class="editor-border">
<SecondaryTabs large class="u-sep-block-end u-padding-8">
{#each ['Unix', 'CMD', 'PowerShell'] as cat}
<SecondaryTabsItem on:click={() => (category = cat)} disabled={category === cat}>
<SecondaryTabsItem
stretch
fullWidth
center
on:click={() => (category = cat)}
disabled={category === cat}>
{cat}
</SecondaryTabsItem>
{/each}