submit-addon:
  label: Submit addon
  namespace: Atoms/TM - Forms/Submit addon
  use: '@atoms/tm-forms/submit-addon/_submit-addon.twig'
  description: Form element with submit as addon
  dependencies:
    - form-select
    - form-label
    - form-submit
  fields:
    sub_input:
      type: pattern
      label: Sub input
      preview:
        - id: form-select
    sub_label:
      type: pattern
      label: Sub label
      preview:
        - id: form-label
          fields:
            title: This is the form label
            settings:
              required: true
    sub_submit:
      type: pattern
      label: Sub submit
      preview:
        - id: form-submit
          fields:
            text: <i class='fas fa-search'></i><span class='sr-only'>Search</span>
            value: submit
  settings:
    label_display:
      type: select
      label: Label display
      options:
        before: Before
        inline: Inline
        after: After
        invisible: Invisible
        hidden: Hidden
      preview: before
      default_value: before
  variants:
    __default:
      label: Default
    textfield:
      label: Textfield
      fields:
        sub_input:
          id: form-input
          variant: textfield
    select:
      label: Select
      fields:
        sub_input:
          id: form-select
