refactor(uishell): renaming variable

This commit is contained in:
Marcus Feitoza 2020-04-18 12:10:35 -03:00
commit 624df2db24

View file

@ -1,7 +1,7 @@
<script> <script>
export let type = undefined; export let type = undefined;
export let icon = undefined; export let icon = undefined;
export let componentIsActive = undefined; export let isOpen = undefined;
let elRigthPanel = undefined; let elRigthPanel = undefined;
@ -12,7 +12,7 @@
function mouseUp({ target }) { function mouseUp({ target }) {
if (target && elRigthPanel) { if (target && elRigthPanel) {
if (!elRigthPanel.contains(target)) { if (!elRigthPanel.contains(target)) {
componentIsActive = false; isOpen = false;
} }
} }
} }
@ -23,14 +23,14 @@
<div id="right-panel-action-component"> <div id="right-panel-action-component">
<button <button
aria-label={type} aria-label={type}
class={cx('--header__action', componentIsActive && '--header__action--active')} class={cx('--header__action', isOpen && '--header__action--active')}
type="button" type="button"
on:click={() => { on:click={() => {
componentIsActive = true; isOpen = true;
}}> }}>
<Icon {...icon} /> <Icon {...icon} />
</button> </button>
{#if componentIsActive} {#if isOpen}
<div <div
bind:this={elRigthPanel} bind:this={elRigthPanel}
id="right-panel-action-component-form" id="right-panel-action-component-form"