From d304728a0564e970733c671aa7409202fa951b50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Keviin=20=C3=85berg=20Kultalahti?= Date: Fri, 9 Apr 2021 15:21:51 +0200 Subject: [PATCH] reworks buttons to use more ergonomic interface --- package.json | 1 + .../{Menu => ActionMenu}/ActionMenu.svelte | 0 packages/bbui/src/Button/Button.svelte | 50 ++++++++----------- packages/bbui/src/Menu/Item.svelte | 0 packages/bbui/src/Menu/Menu.svelte | 38 ++++++++++++++ packages/bbui/src/Menu/Section.svelte | 15 ++++++ packages/bbui/src/index.js | 4 ++ .../builder/src/pages/builder/index.svelte | 6 ++- yarn.lock | 5 ++ 9 files changed, 89 insertions(+), 30 deletions(-) rename packages/bbui/src/{Menu => ActionMenu}/ActionMenu.svelte (100%) create mode 100644 packages/bbui/src/Menu/Item.svelte create mode 100644 packages/bbui/src/Menu/Section.svelte diff --git a/package.json b/package.json index f2ad3c4428..f6f4e26445 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "@spectrum-css/actionbutton": "^1.0.1", "@spectrum-css/actiongroup": "^1.0.1", "@spectrum-css/link": "^3.1.1", + "@spectrum-css/menu": "^3.0.1", "@spectrum-css/toast": "^3.0.1" } } diff --git a/packages/bbui/src/Menu/ActionMenu.svelte b/packages/bbui/src/ActionMenu/ActionMenu.svelte similarity index 100% rename from packages/bbui/src/Menu/ActionMenu.svelte rename to packages/bbui/src/ActionMenu/ActionMenu.svelte diff --git a/packages/bbui/src/Button/Button.svelte b/packages/bbui/src/Button/Button.svelte index 1d84bfc3e6..b646f00c73 100644 --- a/packages/bbui/src/Button/Button.svelte +++ b/packages/bbui/src/Button/Button.svelte @@ -1,13 +1,13 @@ -{#if href} - - {#if icon} - - {/if} + -{/if} + {/if} +