Skip to main content
Glama
nrwl

Nx MCP Server

Official
by nrwl
field-wrapper-mixin.ts1.95 kB
import { html } from 'lit'; import { FieldInterface } from './field-mixin'; import { when } from 'lit/directives/when.js'; import { FieldValueConsumerInterface } from '../../field-value-consumer-mixin'; import { EditorContextInterface } from '@nx-console/shared-ui-components'; export const FieldWrapper = < T extends new ( ...args: any[] ) => FieldInterface & EditorContextInterface & FieldValueConsumerInterface, >( base: T, ) => { return class extends base { render() { return html` <div class="${this.shouldRenderError() ? 'border-error' : this.shouldRenderChanged() ? 'border-primary' : 'border-transparent'} flex flex-col border-l-4 py-2 pl-3" > <div class="flex items-center gap-3"> <label for="${this.fieldId}" >${this.option.name}${this.option.isRequired ? '*' : ''}</label > ${when( this.option['x-hint'], () => html` <popover-element class="flex items-start" .content="${this.option['x-hint']}" > <icon-element class="flex items-start" icon="question"> </icon-element> </popover-element> `, )} </div> <p class="text-mutedForeground mb-2">${this.option.description}</p> ${this.renderField()} ${when( this.shouldRenderError() && typeof this.validation === 'string', () => html`<p class="text-error ${when( this.editor === 'intellij', () => 'mt-1', )} text-sm" id="${this.fieldId}-error" aria-live="polite" > ${this.validation} </p>`, )} </div> `; } }; };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nrwl/nx-console'

If you have feedback or need assistance with the MCP directory API, please join our Discord server