+
+
+ ${this.helperTextAsToolip
+ ? ''
+ : html`
${this.helperText}
`}
+
+ ${this._errorMessage}
+
+
+
+ ${this.readonly
+ ? html`
${checked ? this.t('checked') : this.t('unchecked')}
`
+ : html`
+
+
(this._value = !this._value)}
+ >
+
+
+
{
+ const checkbox = evt.currentTarget as HTMLInputElement;
+ this._value = this.invert ? !checkbox.checked : checkbox.checked;
+ }}
+ />
+
+
+ `}
+ ${this.helperTextAsToolip && this.helperText
+ ? html`
+
+
+ ${this.helperText}
+
+ `
+ : ''}
+
+ `;
+ }
+}
diff --git a/src/elements/internal/InternalSwitchControl/index.ts b/src/elements/internal/InternalSwitchControl/index.ts
new file mode 100644
index 000000000..5e3fc19b9
--- /dev/null
+++ b/src/elements/internal/InternalSwitchControl/index.ts
@@ -0,0 +1,9 @@
+import '@vaadin-component-factory/vcf-tooltip';
+import '../InternalEditableControl/index';
+import '../../public/I18n/index';
+
+import { InternalSwitchControl as Control } from './InternalSwitchControl';
+
+customElements.define('foxy-internal-switch-control', Control);
+
+export { Control as InternalSwitchControl };
diff --git a/src/elements/internal/InternalTextControl/InternalTextControl.test.ts b/src/elements/internal/InternalTextControl/InternalTextControl.test.ts
index ccff5d8b6..ee4318e52 100644
--- a/src/elements/internal/InternalTextControl/InternalTextControl.test.ts
+++ b/src/elements/internal/InternalTextControl/InternalTextControl.test.ts
@@ -63,6 +63,11 @@ describe('InternalTextControl', () => {
expect(new Control()).to.be.instanceOf(InternalEditableControl);
});
+ it('defines a reactive property for "layout" (String)', () => {
+ expect(Control).to.have.deep.nested.property('properties.layout', {});
+ expect(new Control()).to.have.property('layout', null);
+ });
+
it('renders vaadin-text-field element', async () => {
const layout = html`