Skip to content
This repository has been archived by the owner on Jun 7, 2022. It is now read-only.

Drupal 8 module. Special Dropdown to indicate color of a stripe.

License

Notifications You must be signed in to change notification settings

wearewondrous/stripe_color_field

Repository files navigation

stripe_color_field

Drupal 8 module. Special Dropdown to indicate color of a stripe. This module is also Drupal 9 Compatible !

Usage

After install you will find a new field Type called Stripe Color. Use as desired. Go to the settings page /admin/config/content/stripe_color_field and add the needed colors.

We normally add the new field named Stripe Color to a Paragraph called Stripe. Then in the paragraph--stripe.html.twig we put the following:

{% set classes = [
    'panel',
    content.field_stripe_color['#items'].getString
  ]
%}

<section {{ attributes.addClass(classes) }} id="stripe-id-{{ paragraph.id() }}">
  {{ content.field_headline }}
  {{ content.field_inner_paragraphs }}
</section>

Demo Screen

When placed into a field, it looks like this:

Backend settings page

Credits

code base: github.com/wearewondrous/stripe_color_field

developed by WONDROUS LLC

About

Drupal 8 module. Special Dropdown to indicate color of a stripe.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •