-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Accordion): removed forwardEvents as I cant prevent event bubble …
…currently
- Loading branch information
Craig Howell
authored and
Craig Howell
committed
Oct 13, 2022
1 parent
19f3ced
commit 62c3b00
Showing
4 changed files
with
5 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,12 @@ | ||
<script lang="ts"> | ||
import { slide } from 'svelte/transition'; | ||
import { twMerge } from 'tailwind-merge'; | ||
import { current_component } from 'svelte/internal'; | ||
import { forwardEventsBuilder, useActions, type ActionArray } from '../../actions'; | ||
import { exclude } from '../../utils/exclude'; | ||
export let use: ActionArray = []; | ||
const forwardEvents = forwardEventsBuilder(current_component); | ||
const defaultClass = | ||
'border-t border-light-border dark:border-dark-border text-light-secondary-content dark:text-dark-secondary-content'; | ||
$: finalClass = twMerge(defaultClass, $$props.class); | ||
</script> | ||
|
||
<div | ||
transition:slide|local | ||
class={finalClass} | ||
style={$$props.style} | ||
use:useActions={use} | ||
use:forwardEvents | ||
{...exclude($$props, ['use', 'class'])} | ||
> | ||
<div transition:slide|local class={finalClass} style={$$props.style}> | ||
<slot /> | ||
</div> |
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