Skip to content

Commit ecc5c4d

Browse files
committed
fix(dropdowns): add missing centered examples
1 parent 3978ca3 commit ecc5c4d

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

src/app/views/buttons/dropdowns/dropdowns.component.html

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,4 +477,34 @@
477477
</c-card-body>
478478
</c-card>
479479
</c-col>
480+
<c-col xs="12">
481+
<c-card class="mb-4">
482+
<c-card-header ngPreserveWhitespaces>
483+
<strong>Angular Dropdown</strong> <small>Centered</small>
484+
</c-card-header>
485+
<c-card-body>
486+
<p class="text-medium-emphasis small">
487+
Trigger dropdown menus centered below the toggle by adding <code>direction="center"</code> to the <code>c-dropdown</code> component.
488+
</p>
489+
<app-docs-example href="components/dropdown#centered">
490+
<c-dropdown direction="center" variant="btn-group">
491+
<button cButton cDropdownToggle color="secondary">Centered dropdown</button>
492+
<ul cDropdownMenu>
493+
<li><button cDropdownItem>Action one</button></li>
494+
<li><button cDropdownItem>Action two</button></li>
495+
<li><button cDropdownItem>Action three</button></li>
496+
</ul>
497+
</c-dropdown>
498+
<c-dropdown direction="dropup-center" class="dropup" variant="btn-group">
499+
<button cButton cDropdownToggle color="secondary">Centered dropdup</button>
500+
<ul cDropdownMenu>
501+
<li><button cDropdownItem>Action one</button></li>
502+
<li><button cDropdownItem>Action two</button></li>
503+
<li><button cDropdownItem>Action three</button></li>
504+
</ul>
505+
</c-dropdown>
506+
</app-docs-example>
507+
</c-card-body>
508+
</c-card>
509+
</c-col>
480510
</c-row>

0 commit comments

Comments
 (0)