tm_bits_badge:
  namespace: "Molecules/TM - Bits & Pieces"
  use: "@molecules/tm-bits/tm-bits-badge.twig"
  label: Badges
  description: Badges
  libraries:
    - tm_bits_badge_lib:
        css:
          component:
            ../styles/tm-bits-badge.css: { }

  fields:
    badge_text:
      type: text
      label: Badge text - Top
      preview: "From Just"
    badge_text_large:
      type: text
      label: Badge text - Bottom
      preview: "£20.00"

  settings:
    floating:
      type: boolean
      label: Floating
      preview: false
      default: false

tm_bits_date:
  namespace: "Molecules/TM - Bits & Pieces"
  use: "@molecules/tm-bits/tm-bits-date.twig"
  label: Date single

  fields:
    datetime:
      type: text
      label: Date time value
      preview: "2022-12-31T00:00:00+00:00"
    date_format:
      type: text
      label: Date format
      preview: 'D, d M Y'

tm_bits_tags:
  namespace: "Molecules/TM - Bits & Pieces"
  use: "@molecules/tm-bits/tm-bits-tags.twig"
  label: Tags
  libraries:
    - tm_bits_tags_lib:
        css:
          component:
            ../styles/tm-bits-tags.css: { }

  fields:
    tags:
      type: object
      label: Tags
      preview:
        - name: "A tag"
          url: "/"
        - name: "Another tag"
          url: "/"
          color: blue
        - name: "Yet another tag"
          url: "/"
          color: green

  settings:
    not_links:
      type: boolean
      label: Not links
      description: Override links if in data
      preview: false
      default_vlaue: false

tm_bits_hotlink:
  namespace: "Molecules/TM - Bits & Pieces"
  use: "@molecules/tm-bits/tm-bits-hotlink.twig"
  label: Share link
  libraries:
    - tm_bits_hotlink_lib:
        css:
          component:
            ../styles/tm-bits-hotlink.css: { }

  fields:
    url:
      type: text
      label: Link
      preview: 'https://this.com#123'
    button_text:
      type: text
      label: Button text
      preview: 'Share'
    lid:
      type: text
      label: ID
      preview: '123'

tm_bits_ajax:
  namespace: "Molecules/TM - Bits & Pieces"
  use: "@molecules/tm-bits/tm-bits-ajax.twig"
  label: Ajax fullscreen
  description: Ajax fullscreen
  libraries:
    - tm_bits_ajax_lib:
        css:
          component:
            ../styles/tm-bits-ajax.css: { }

tm_bits_timeago:
  namespace: "Molecules/TM - Bits & Pieces"
  use: "@molecules/tm-bits/tm-bits-timeago.twig"
  label: Time ago
  description: Time ago
