Skip to content

Commit 46f2a7d

Browse files
authored
docs(modal): add section on footer button sizing (#4108)
1 parent 2dd8d5a commit 46f2a7d

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

src/components/modal/README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,32 @@ hidden. You can disable this behaviour by setting the `no-close-on-backdrop` pro
623623
To disable the fading transition/animation when modal opens and closes, just set the prop `no-fade`
624624
on the `<b-modal>` component.
625625

626-
### Disabling built-in buttons
626+
### Footer button sizing
627+
628+
Fancy smaller or larger buttons in the default footer? Simply set the `button-size` prop to `'sm'`
629+
for small buttons, or `'lg'` for larger buttons.
630+
631+
```html
632+
<div>
633+
<b-button v-b-modal.modal-footer-sm>Small Footer Buttons</b-button>
634+
<b-button v-b-modal.modal-footer-lg>Large Footer Buttons</b-button>
635+
636+
<b-modal id="modal-footer-sm" title="BootstrapVue" button-size="sm">
637+
<p class="my-2">This modal has small footer buttons</p>
638+
</b-modal>
639+
640+
<b-modal id="modal-footer-lg" title="BootstrapVue" button-size="lg">
641+
<p class="my-2">This modal has large footer buttons</p>
642+
</b-modal>
643+
</div>
644+
645+
<!-- modal-footer-btn-sizes.vue -->
646+
```
647+
648+
The prop `button-size` has no effect if you have provided your own footer via the
649+
[`modal-footer`](#custom-rendering-with-slots) slot.
650+
651+
### Disabling built-in footer buttons
627652

628653
You can disable the built-in footer buttons programmatically.
629654

0 commit comments

Comments
 (0)