n8n/packages/nodes-base/nodes/StickyNote/StickyNote.node.ts
Iván Ovejero b03e358a12
refactor: Integrate consistent-type-imports in nodes-base (no-changelog) (#5267)
* 👕 Enable `consistent-type-imports` for nodes-base

* 👕 Apply to nodes-base

*  Undo unrelated changes

* 🚚 Move to `.eslintrc.js` in nodes-base

*  Revert "Enable `consistent-type-imports` for nodes-base"

This reverts commit 529ad72b05.

* 👕 Fix severity
2023-01-27 12:22:44 +01:00

51 lines
1.3 KiB
TypeScript

import type { IExecuteFunctions } from 'n8n-core';
import type { INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
export class StickyNote implements INodeType {
description: INodeTypeDescription = {
displayName: 'Sticky Note',
name: 'stickyNote',
icon: 'fa:sticky-note',
group: ['input'],
version: 1,
description: 'Make your workflow easier to understand',
defaults: {
name: 'Sticky Note',
color: '#FFD233',
},
// eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node
inputs: [],
// eslint-disable-next-line n8n-nodes-base/node-class-description-outputs-wrong
outputs: [],
properties: [
{
displayName: 'Content',
name: 'content',
type: 'string',
required: true,
default:
"## I'm a note \n**Double click** to edit me. [Guide](https://docs.n8n.io/workflows/sticky-notes/)",
},
{
displayName: 'Height',
name: 'height',
type: 'number',
required: true,
default: 160,
},
{
displayName: 'Width',
name: 'width',
type: 'number',
required: true,
default: 240,
},
],
};
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
const items = this.getInputData();
return this.prepareOutputData(items);
}
}