flowbite-svelte 0.15.33 → 0.15.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.15.34](https://github.com/themesberg/flowbite-svelte/compare/v0.15.33...v0.15.34) (2022-05-15)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* add childClass and ulClass to SidebarDropdown ([8754489](https://github.com/themesberg/flowbite-svelte/commit/875448911cbf0e427f51a08b51d5f160974b159b))
|
|
11
|
+
|
|
5
12
|
### [0.15.33](https://github.com/themesberg/flowbite-svelte/compare/v0.15.32...v0.15.33) (2022-05-15)
|
|
6
13
|
|
|
7
14
|
|
|
@@ -6,16 +6,10 @@ export let btnClass = 'flex items-center focus:ring-4 focus:ring-gray-200 dark:f
|
|
|
6
6
|
export let slotClass = 'p-5 border border-t-0 border-gray-200 dark:border-gray-700';
|
|
7
7
|
export let isOpen = false;
|
|
8
8
|
export let color = false;
|
|
9
|
-
// export let flush: boolean = false;
|
|
10
9
|
export let icons = {
|
|
11
10
|
up: ChevronUpSolid,
|
|
12
11
|
down: ChevronDownSolid
|
|
13
12
|
};
|
|
14
|
-
// if (flush) {
|
|
15
|
-
// btnClass = 'flex justify-between items-center py-5 w-full font-medium text-left text-gray-500 border-b border-gray-200 dark:border-gray-700 dark:text-gray-400';
|
|
16
|
-
// slotClass = 'py-5 border-b border-gray-200 dark:border-gray-700';
|
|
17
|
-
// }
|
|
18
|
-
// $: console.log('isOpen', isOpen);
|
|
19
13
|
onMount(() => {
|
|
20
14
|
if (isOpen) {
|
|
21
15
|
isOpen = true;
|
package/package.json
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<script>import { slide } from 'svelte/transition';
|
|
2
2
|
export let link;
|
|
3
|
+
export let childClass = 'flex items-center p-2 pl-11 w-full text-base font-normal text-gray-900 rounded-lg transition duration-75 group hover:bg-gray-100 dark:text-white dark:hover:bg-gray-700';
|
|
4
|
+
export let ulClass = 'py-2 space-y-2';
|
|
3
5
|
let isOpen = false;
|
|
4
6
|
let activeDropdown = undefined;
|
|
5
7
|
const handleDropdown = (id) => {
|
|
@@ -17,10 +19,10 @@ const handleDropdown = (id) => {
|
|
|
17
19
|
<svg sidebar-toggle-item="" class="w-6 h-6" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" /></svg>
|
|
18
20
|
</button>
|
|
19
21
|
{#if isOpen && link.id == activeDropdown}
|
|
20
|
-
<ul id="dropdown" class=
|
|
22
|
+
<ul id="dropdown" class={ulClass} transition:slide={{ duration: 500 }}>
|
|
21
23
|
{#each link.children as child}
|
|
22
24
|
<li>
|
|
23
|
-
<a href={child.href} rel={child.rel} class=
|
|
25
|
+
<a href={child.href} rel={child.rel} class={childClass}>{child.name}</a>
|
|
24
26
|
</li>
|
|
25
27
|
{/each}
|
|
26
28
|
</ul>
|