Commit a0dbd250 authored by Dominique Feyer's avatar Dominique Feyer
Browse files

TASK: Refactor form input and improve dropdown

parent 01f357ab
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -188,30 +188,30 @@ declare global {
declare global {

  namespace StencilComponents {
    interface NeosFormInputLabel {
    interface NeosFormInputWrapper {
      'label': string;
    }
  }

  interface HTMLNeosFormInputLabelElement extends StencilComponents.NeosFormInputLabel, HTMLStencilElement {}
  interface HTMLNeosFormInputWrapperElement extends StencilComponents.NeosFormInputWrapper, HTMLStencilElement {}

  var HTMLNeosFormInputLabelElement: {
    prototype: HTMLNeosFormInputLabelElement;
    new (): HTMLNeosFormInputLabelElement;
  var HTMLNeosFormInputWrapperElement: {
    prototype: HTMLNeosFormInputWrapperElement;
    new (): HTMLNeosFormInputWrapperElement;
  };
  interface HTMLElementTagNameMap {
    'neos-form-input-label': HTMLNeosFormInputLabelElement;
    'neos-form-input-wrapper': HTMLNeosFormInputWrapperElement;
  }
  interface ElementTagNameMap {
    'neos-form-input-label': HTMLNeosFormInputLabelElement;
    'neos-form-input-wrapper': HTMLNeosFormInputWrapperElement;
  }
  namespace JSX {
    interface IntrinsicElements {
      'neos-form-input-label': JSXElements.NeosFormInputLabelAttributes;
      'neos-form-input-wrapper': JSXElements.NeosFormInputWrapperAttributes;
    }
  }
  namespace JSXElements {
    export interface NeosFormInputLabelAttributes extends HTMLAttributes {
    export interface NeosFormInputWrapperAttributes extends HTMLAttributes {
      'label'?: string;
    }
  }
+2 −2
Original line number Diff line number Diff line
@@ -37,9 +37,9 @@ export class Dropdown {
  render() {
    return (
      <div>
        <neos-form-input-label label={this.label}>
        <neos-form-input-wrapper label={this.label}>
          <slot name="metadata"/>
        </neos-form-input-label>
        </neos-form-input-wrapper>
        <div class={this.wrapperClassName()}>
          <a href="#" class="dropdown" onClick={(e) => this.toggle(e)}>
            <div class="icon">
+0 −22
Original line number Diff line number Diff line
import {Component, Prop} from '@stencil/core';

@Component({
  tag: 'neos-form-input-label',
  styleUrl: 'styles/form-input-label.dark.scss',
  shadow: true
})
export class FormInputLabel {

  @Prop() label: string;

  render() {
    return (
      <div class="label">
        <neos-label label={this.label}></neos-label>
        <div class="metadata">
          <slot/>
        </div>
      </div>
    );
  }
}
+0 −14
Original line number Diff line number Diff line
@import "./form-input-label";
@import "./form-input-label.dark.vars";

:host {
  color: $text-dark-color-value;
  font-family: $font-family-dark-base;
  font-weight: 400;
  font-size: $font-size-dark-base;
  line-height: 1.1;

  .metadata {
    margin-left: auto;
  }
}
+0 −2
Original line number Diff line number Diff line
@import "../../../themes/neos.globals.dark";
Loading