mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
refactor(uishell): renaming variable
This commit is contained in:
parent
0fe1a1645c
commit
624df2db24
1 changed files with 5 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
export let type = undefined;
|
||||
export let icon = undefined;
|
||||
export let componentIsActive = undefined;
|
||||
export let isOpen = undefined;
|
||||
|
||||
let elRigthPanel = undefined;
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
|||
function mouseUp({ target }) {
|
||||
if (target && elRigthPanel) {
|
||||
if (!elRigthPanel.contains(target)) {
|
||||
componentIsActive = false;
|
||||
isOpen = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -23,14 +23,14 @@
|
|||
<div id="right-panel-action-component">
|
||||
<button
|
||||
aria-label={type}
|
||||
class={cx('--header__action', componentIsActive && '--header__action--active')}
|
||||
class={cx('--header__action', isOpen && '--header__action--active')}
|
||||
type="button"
|
||||
on:click={() => {
|
||||
componentIsActive = true;
|
||||
isOpen = true;
|
||||
}}>
|
||||
<Icon {...icon} />
|
||||
</button>
|
||||
{#if componentIsActive}
|
||||
{#if isOpen}
|
||||
<div
|
||||
bind:this={elRigthPanel}
|
||||
id="right-panel-action-component-form"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue