{% load components %} {# Django template for Layout #} {# Supports variant: 'single-column' (default), 'grid' #} {# For grid: content, leftSidebar, rightSidebar #} {% fragment as expandButton %} {% if expandable %} {% dict aria_expanded="false" aria_label="Expand" onclick="const layout = this.closest('.usx-layout'); const expanded = layout.classList.toggle('usx-expanded'); this.setAttribute('aria-expanded', expanded); this.setAttribute('aria-label', expanded ? 'Contract' : 'Expand');" as expandAttributes %} {% button variant="primary" ghost=True type="button" className="usx-layout__expand-button" extraAttributes=expandAttributes %} {% icon source='usx' name='expand' size=3 className='usx-layout__expand-icon usx-layout__expand-icon--expand' %}{% endicon %} {% icon source='usx' name='contract' size=3 className='usx-layout__expand-icon usx-layout__expand-icon--contract' %}{% endicon %} {% endbutton %} {% endif %} {% endfragment %}