Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tab theme #166

Merged
merged 3 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/tall-humans-fold.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@ldn-viz/ui': minor
---

CHANGED - provide a default light theme for tabs
8 changes: 4 additions & 4 deletions packages/ui/src/lib/tabs/TabLabel.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { getContext } from 'svelte';
import type { Writable } from 'svelte/types/runtime/store';
import type { Writable } from 'svelte/store';
import { classNames } from '../utils/classNames';

export let tabId: string;
Expand All @@ -23,9 +23,9 @@
role="tab"
class={classNames(
tabId === $selectedValue
? 'bg-core-blue-600 cursor-default'
: 'bg-core-grey-600 hover:bg-core-grey-500 cursor-pointer',
'text-white text-base py-2 px-4 flex items-center select-none '
? 'bg-core-blue-600 cursor-default text-white'
: 'bg-core-grey-100 hover:bg-core-grey-200 text-core-grey-800 dark:bg-core-grey-600 dark:hover:bg-core-grey-500 dark:text-white cursor-pointer',
'text-base py-2 px-4 flex items-center select-none '
)}
>
<slot />
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/lib/tabs/TabList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</script>

<div
class="flex bg-core-grey-800 border-b-4 border-b-core-blue-600 w-full pt-5 px-4 pb-0 space-x-0.5 items-end"
class="flex bg-white dark:bg-core-grey-800 border-b-4 border-b-core-blue-600 w-full pt-5 px-4 pb-0 space-x-0.5 items-end"
>
<slot />
</div>
Loading