<!-- Collapse container starts -->
<section class="c-collapse-container">
    <h3 class="c-collapse-container__heading">Update your selected filters</h3>
    <div class="c-collapse-container__content">
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
            irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat</p>
    </div>
</section>
<!-- Collapse container ends -->
<!-- Collapse container starts -->
<section class="c-collapse-container">
  <h3 class="c-collapse-container__heading">Update your selected filters</h3>
  <div class="c-collapse-container__content">
    {{#if filterBox}}
    {{render '@filter-box'}}
    {{else}}
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat</p>
    {{/if}}
  </div>
</section>
<!-- Collapse container ends -->
/* No context defined for this component. */
  • Content:
    $collapse-border: rem(1.5) solid $color-grey-300;
    
    .c-collapse-container {
      position: relative;
    }
    
      .c-collapse-container__heading {
        position: relative;
        padding: $space-xs $space-unit;
        border: $collapse-border;
        border-radius: $global-radius;
        border-color: transparent;
        background-color: $color-brand-secondary-100;
        color: $color-brand-secondary-900;
        @include text-preset-6;
        cursor: pointer;
        transition: $global-transition;
    
        @include hocus(){
          background-color: darken($color-brand-secondary-100, 5%);
        }
    
        &::after {
          display: block;
          position: absolute;
          top: 40%;
          right: $space-unit;
          width: $space-xs;
          height: $space-xs;
          transform: rotate(135deg);
          border-top: rem(1.8) solid;
          border-left: rem(1.8) solid;
          border-color: rgba($color-brand-secondary-900, 0.8);
          content: '';
        }
    
        &.is-open {
          border: $collapse-border;
          border-bottom: 0;
          border-radius: $global-radius $global-radius 0 0;
    
          &::after {
            top: 36%;
            transform: rotate(-135deg);
          }
    
          + .c-collapse-container__content,
          + .c-collapse-container__content + * {
            display: block;
    
            .c-filter-box {
              border: $collapse-border;
              border-top: 0;
              border-radius: 0 0 $global-radius $global-radius;
            }
          }
        }
      }
    
      .c-collapse-container__content,
      .c-collapse-container__update-filters {
        display: none;
      }
    
        .c-collapse-container__update-filters {
          z-index: 50;
          position: absolute;
          top: rem(262);
          left: $space-md;
        }
    
        .c-filter-box--transaction + .c-collapse-container__update-filters  {
          top: rem(356);
        }
    
  • URL: /components/raw/collapse-container/_collapse-container.scss
  • Filesystem Path: components/_code-components/collapse-container/_collapse-container.scss
  • Size: 1.7 KB
  • Content:
    var parentNav = document.querySelectorAll('.c-collapse-container__heading');
    
    for (var i = 0, l = parentNav.length; i < l; i++) {
      parentNav[i].onclick = function() {
        this.classList.toggle('is-open');
        return false;
      }
    }
    
  • URL: /components/raw/collapse-container/collapse-container.js
  • Filesystem Path: components/_code-components/collapse-container/collapse-container.js
  • Size: 230 Bytes

There are no notes for this item.