From 7f05d74355b71fe91ab53051c6637c18c4777150 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Keviin=20=C3=85berg=20Kultalahti?= Date: Thu, 15 Apr 2021 14:42:39 +0200 Subject: [PATCH] working sliding animation between tabs --- packages/bbui/src/Tabs/Tab.svelte | 21 +++++-- packages/bbui/src/Tabs/Tabs.svelte | 58 +++++++++++++++++-- .../builder/src/pages/builder/index.svelte | 3 +- 3 files changed, 70 insertions(+), 12 deletions(-) diff --git a/packages/bbui/src/Tabs/Tab.svelte b/packages/bbui/src/Tabs/Tab.svelte index 46d8f175c5..e5c9344433 100644 --- a/packages/bbui/src/Tabs/Tab.svelte +++ b/packages/bbui/src/Tabs/Tab.svelte @@ -1,13 +1,26 @@ -
$selected = title } class:is-selected={$selected === title} class="spectrum-Tabs-item" tabindex="0"> +
$selected = {...$selected, title, info: tab.getBoundingClientRect()} } class:is-selected={$selected.title === title} class="spectrum-Tabs-item" tabindex="0"> {#if icon} {title}
-{#if $selected === title} - +{#if $selected.title === title} + {/if} \ No newline at end of file diff --git a/packages/bbui/src/Tabs/Tabs.svelte b/packages/bbui/src/Tabs/Tabs.svelte index 56f3601a98..74a5e5d1a5 100644 --- a/packages/bbui/src/Tabs/Tabs.svelte +++ b/packages/bbui/src/Tabs/Tabs.svelte @@ -1,23 +1,69 @@ -
+
+
-
+
\ No newline at end of file diff --git a/packages/builder/src/pages/builder/index.svelte b/packages/builder/src/pages/builder/index.svelte index b477359f87..51d20bb6d3 100644 --- a/packages/builder/src/pages/builder/index.svelte +++ b/packages/builder/src/pages/builder/index.svelte @@ -3,7 +3,7 @@ import AppList from "components/start/AppList.svelte" import { get } from "builderStore/api" import CreateAppModal from "components/start/CreateAppModal.svelte" - import { Button, Heading, Modal, Spacer, Tabs, Tab } from "@budibase/bbui" + import { Button, Heading, Modal, Spacer, Tabs, Tab, Divider } from "@budibase/bbui" import TemplateList from "components/start/TemplateList.svelte" import analytics from "analytics" import Banner from "/assets/orange-landscape.png" @@ -75,7 +75,6 @@ -