-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update dashboard header layout and tab component (#4063)
* update dashboard header and tab component * remove unused variables * typo
- Loading branch information
1 parent
c588b51
commit 062b151
Showing
6 changed files
with
129 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,30 @@ | ||
<script lang="ts"> | ||
import { Tab } from "@rgossiaux/svelte-headlessui"; | ||
import TooltipContent from "@rilldata/web-common/components/tooltip/TooltipContent.svelte"; | ||
const baseClasses = "font-semibold py-2 px-1 items-center"; | ||
export let disabled = false; | ||
export let selected = false; | ||
</script> | ||
|
||
<Tab | ||
{disabled} | ||
class={({ selected }) => { | ||
return `${baseClasses} ${ | ||
selected ? "text-blue-600 border-b-2 border-blue-500" : "text-gray-500" | ||
}`; | ||
}} | ||
> | ||
<button class="relative group" class:selected {disabled} on:click> | ||
<slot /> | ||
</Tab> | ||
{#if disabled} | ||
<div | ||
class="absolute top-full translate-y-2 z-10 w-fit -translate-x-1/2 left-1/2 group-hover:block hidden" | ||
> | ||
<TooltipContent>Coming Soon</TooltipContent> | ||
</div> | ||
{/if} | ||
</button> | ||
|
||
<style lang="postcss"> | ||
button { | ||
@apply border-b-2 border-transparent; | ||
@apply flex items-center relative; | ||
@apply p-1 gap-x-2; | ||
@apply font-medium text-xs text-gray-500; | ||
} | ||
.selected { | ||
@apply border-b-2 border-primary-600 text-primary-600; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
062b151
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://ui.rilldata.in as production
🚀 Deployed on https://65ce7949b4ffcc38dc55fd77--rill-ui-dev.netlify.app