fix(editor): fix pin data button active state (#4157)

fix: fix pin data button active state
This commit is contained in:
Alex Grozav 2022-09-21 13:21:08 +03:00 committed by GitHub
parent 40ebbeaefc
commit 3df5ea5ebd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 14 deletions

View file

@ -80,9 +80,9 @@
</div>
</template>
<n8n-icon-button
:class="`ml-2xs ${$style['pin-data-button']} ${hasPinData ? $style['pin-data-button-active'] : ''}`"
:class="['ml-2xs', $style['pin-data-button']]"
type="tertiary"
active
:active="hasPinData"
icon="thumbtack"
:disabled="editMode.enabled || (inputData.length === 0 && !hasPinData) || isReadOnly"
@click="onTogglePinData({ source: 'pin-icon-click' })"
@ -1463,17 +1463,6 @@ export default mixins(
}
}
.pin-data-button-active {
&,
&:hover,
&:focus,
&:active {
border-color: var(--color-primary);
color: var(--color-primary);
background: var(--color-primary-tint-2);
}
}
.spinner {
* {
color: var(--color-primary);

View file

@ -4,7 +4,7 @@ import { IPinData } from 'n8n-workflow';
import { stringSizeInBytes } from '@/components/helpers';
import { MAX_WORKFLOW_PINNED_DATA_SIZE, PIN_DATA_NODE_TYPES_DENYLIST } from '@/constants';
interface IPinDataContext {
export interface IPinDataContext {
node: INodeUi;
$showError(error: Error, title: string): void;
}