Action C
@@ -163,10 +165,10 @@ Multiple add-ons are supported and can be mixed with checkbox and radio input ve
-
+
$
-
+
@@ -192,7 +194,7 @@ To control width, place the input inside standard Bootstrap grid column.
class="mb-3"
prepend="Label"
>
-
+
Button
diff --git a/src/components/jumbotron/README.md b/src/components/jumbotron/README.md
index 097997d3916..a1fcf242a92 100644
--- a/src/components/jumbotron/README.md
+++ b/src/components/jumbotron/README.md
@@ -33,7 +33,7 @@ Anything else between the opening and closing tags will be rendered at the botto
featured content or information.
-
+
It uses utility classes for typography and spacing to space content out within the larger
@@ -94,7 +94,7 @@ jumbotron to use the default styling.
featured content or information.
-
+
It uses utility classes for typography and spacing to space content out within the larger
diff --git a/src/components/layout/README.md b/src/components/layout/README.md
index 0e568cd83ee..b1c9985340d 100644
--- a/src/components/layout/README.md
+++ b/src/components/layout/README.md
@@ -232,7 +232,7 @@ Both these fixes have been documented in a
Column
Column
-
+
Column
Column
diff --git a/src/components/layout/col.js b/src/components/layout/col.js
index fae078a7c83..e3f5c1006da 100644
--- a/src/components/layout/col.js
+++ b/src/components/layout/col.js
@@ -45,7 +45,7 @@ export default (resolve, reject) => {
className += `-${breakpoint}`
}
// Handling the boolean style prop when accepting [Boolean, String, Number]
- // means Vue will not convert to sm: true for us.
+ // means Vue will not convert to sm: true for us.
// Since the default is false, an empty string indicates the prop's presence.
if (type === 'col' && (val === '' || val === true)) {
// .col-md
diff --git a/src/components/layout/col.spec.js b/src/components/layout/col.spec.js
index 24bf4871e45..ff06eb6e656 100644
--- a/src/components/layout/col.spec.js
+++ b/src/components/layout/col.spec.js
@@ -91,7 +91,7 @@ describe('col', () => {
it("should apply boolean breakpoint classes for 'sm', 'md', 'lg', 'xl' prop", async () => {
const { $refs } = window.app
;['sm', 'md', 'lg', 'xl'].forEach((bkpt, idx) => {
- // Shorthand binding
+ // Shorthand binding
expect($refs[bkpt]).toHaveClass(`col-${bkpt}`)
// Dynamically bound using object literals { sm: true }
expect($refs[`boolean-breakpoints`][idx]).toHaveClass(`col-${bkpt}`)
diff --git a/src/components/link/README.md b/src/components/link/README.md
index da1981d6f3c..3df0d4213cb 100644
--- a/src/components/link/README.md
+++ b/src/components/link/README.md
@@ -1,6 +1,6 @@
# Links
-> Use BootstrapVue’s custom `b-link` component for generating a standard `` link or
+> Use BootstrapVue's custom `b-link` component for generating a standard `` link or
> ``. `` supports the `disabled` state and `click` event propagation.
`` is the building block for most BootstrapVue components that offer link functionality.
diff --git a/src/components/media/README.md b/src/components/media/README.md
index e6bb5f77c5b..882bde02cae 100644
--- a/src/components/media/README.md
+++ b/src/components/media/README.md
@@ -8,7 +8,7 @@
-
+
Media Title
@@ -22,7 +22,7 @@
-
+
Nested Media
@@ -42,7 +42,7 @@
```html
-
+
Media Body
Some text
@@ -59,7 +59,7 @@
-
+
@@ -75,7 +75,7 @@
-
+
Nested Media
Fusce condimentum nunc ac nisi vulputate fringilla. Donec lacinia congue felis in
faucibus.
@@ -95,7 +95,7 @@ Change the order of content in media objects by adding `right-align` property.
```html
-
+
Media object
@@ -129,7 +129,7 @@ use spacing utilities wherever needed to fine tune.
-
+
List-based media object
@@ -140,7 +140,7 @@ use spacing utilities wherever needed to fine tune.
-
+
List-based media object
@@ -151,7 +151,7 @@ use spacing utilities wherever needed to fine tune.
-
+
List-based media object
diff --git a/src/components/modal/README.md b/src/components/modal/README.md
index 4635838d802..7ed5cac0ccd 100644
--- a/src/components/modal/README.md
+++ b/src/components/modal/README.md
@@ -6,10 +6,10 @@
```html
-
Launch demo modal
+
Launch demo modal
-
+
Hello from modal!
@@ -49,13 +49,13 @@ Other elements can easily show modals using the `v-b-modal` directive.
```html
- Show Modal
+ Show Modal
- Show Modal
+ Show Modal
- Hello From My Modal!
+ Hello From My Modal!
@@ -75,10 +75,10 @@ methods.
```html
-
Open Modal
-
Toggle Modal
+
Open Modal
+
Toggle Modal
-
+
Hello From My Modal!
@@ -92,15 +92,15 @@ methods.
export default {
methods: {
showModal() {
- this.$refs.myModalRef.show()
+ this.$refs['my-modal'].show()
},
hideModal() {
- this.$refs.myModalRef.hide()
+ this.$refs['my-modal'].hide()
},
toggleModal() {
- // We pass the ID of the button that we want to return focus to when
- // the modal has hidden
- this.$refs.myModalRef.toggle('#toggleBtn')
+ // We pass the ID of the button that we want to return focus to
+ // when the modal has hidden
+ this.$refs['my-modal'].toggle('#toggle-btn')
}
}
}
@@ -152,7 +152,7 @@ reference, or a component reference (the root element of the component will be f
Open Modal
Toggle Modal
-
+
Hello From My Modal!
Close Me
Toggle Me
@@ -161,15 +161,17 @@ reference, or a component reference (the root element of the component will be f
```
```js
-methods: {
- showModal () {
- this.$root.$emit('bv::show::modal','modal1', '#btnShow')
- },
- hideModal () {
- this.$root.$emit('bv::hide::modal','modal1', '#btnShow')
- },
- toggleModal () {
- this.$root.$emit('bv::toggle::modal','modal1', '#btnToggle')
+export default {
+ methods: {
+ showModal() {
+ this.$root.$emit('bv::show::modal', 'modal-1', '#btnShow')
+ },
+ hideModal() {
+ this.$root.$emit('bv::hide::modal', 'modal-1', '#btnShow')
+ },
+ toggleModal() {
+ this.$root.$emit('bv::toggle::modal', 'modal-1', '#btnToggle')
+ }
}
}
```
@@ -184,7 +186,7 @@ called synchronously, as async is not supported.
```html
-
Launch demo modal
+
Launch demo modal
@@ -196,14 +198,14 @@ called synchronously, as async is not supported.
@@ -275,13 +277,13 @@ breakpoints to avoid horizontal scrollbars on narrower viewports. Valid optional
```html
- xl modal
- lg modal
- sm modal
+ xl modal
+ lg modal
+ sm modal
- Hello Extra Large Modal!
- Hello Large Modal!
- Hello Small Modal!
+ Hello Extra Large Modal!
+ Hello Large Modal!
+ Hello Small Modal!
@@ -406,33 +408,70 @@ the `header-border-variant` and `footer-border-variant` props respectively.
>
-
+
Background
Text
Header
-
-
+
+
+
+
+
+
Body
-
-
+
+
+
+
+
+
Footer
-
-
+
+
+
+
+
+
Modal Footer Content
-
Close
+
+ Close
+
@@ -527,10 +566,12 @@ component. This will hide the modal before another modal is shown.
To listen to any modal opening, use:
```js
-mounted() {
- this.$root.$on('bv::modal::show', (bvEvent, modalId) => {
- console.log('Modal is about to be shown', bvEvent, modalId)
- })
+export default {
+ mounted() {
+ this.$root.$on('bv::modal::show', (bvEvent, modalId) => {
+ console.log('Modal is about to be shown', bvEvent, modalId)
+ })
+ }
}
```
@@ -561,24 +602,26 @@ already has focus within the ``.
-
+
-
+
-
+
```
```js
-methods: {
- focusMyElement(e) {
- this.$refs.focusThis.focus()
+export default {
+ methods: {
+ focusMyElement(e) {
+ this.$refs.focusThis.focus()
+ }
}
}
```
@@ -617,7 +660,7 @@ When using the `bv::show::modal` event (emitted on `$root`), you can specify a s
is the element to return focus to. This argument accepts the same types as the `return-focus` prop.
```js
-this.$root.$emit('bv::show::modal', 'modal1', '#focusThisOnClose')
+this.$root.$emit('bv::show::modal', 'modal-1', '#focusThisOnClose')
```
_Tip:_ if using a click event (or similar) to trigger modal to open, pass the event's `target`
@@ -625,7 +668,7 @@ property:
```html
- Open Modal
+ Open Modal
```
diff --git a/src/components/modal/fixtures/modal.html b/src/components/modal/fixtures/modal.html
index 26f8d12ae58..9d57b997d59 100644
--- a/src/components/modal/fixtures/modal.html
+++ b/src/components/modal/fixtures/modal.html
@@ -20,8 +20,7 @@
@shown="clearName">
diff --git a/src/components/nav/README.md b/src/components/nav/README.md
index 753a09b6617..b414bdc3846 100644
--- a/src/components/nav/README.md
+++ b/src/components/nav/README.md
@@ -130,14 +130,14 @@ Use `` to place dropdown items within your nav.
Active
Link
one
two
-
+
three
@@ -151,14 +151,14 @@ default have the classes `nav-link` and `dropdown-toggle`. Use the `extra-toggle
add them (like above) which will produce something like:
```html
--
+
-
+ >
...
```
diff --git a/src/components/navbar/README.md b/src/components/navbar/README.md
index 207c825a4b9..1112073e1b9 100644
--- a/src/components/navbar/README.md
+++ b/src/components/navbar/README.md
@@ -11,9 +11,9 @@
NavBar
-
+
-
+
Link
Disabled
@@ -22,7 +22,7 @@
-
+
Search
@@ -34,10 +34,10 @@
-
+
User
Profile
- Signout
+ Sign Out
@@ -122,7 +122,7 @@ properly size. Here are some examples to demonstrate:
-
+
@@ -135,7 +135,7 @@ properly size. Here are some examples to demonstrate:
-
+
BootstrapVue
@@ -179,11 +179,11 @@ alignment and horizontal spacing for strings of text.
```html
-
+
BootstrapVue
-
+
Navbar text
@@ -232,7 +232,7 @@ Use `` to place inline form controls into your navbar
-
+
Search
@@ -248,7 +248,7 @@ Input groups work as well:
-
+
diff --git a/src/components/pagination-nav/README.md b/src/components/pagination-nav/README.md
index d6f11c829f4..7ebc4bf55e1 100644
--- a/src/components/pagination-nav/README.md
+++ b/src/components/pagination-nav/README.md
@@ -14,7 +14,7 @@ component pagination (such as table or list pagination), use the
```html
-
+
@@ -22,11 +22,7 @@ component pagination (such as table or list pagination), use the
export default {
methods: {
linkGen(pageNum) {
- if (pageNum === 1) {
- return '?'
- } else {
- return '?page=' + pageNum
- }
+ return pageNum === 1 ? '?' : `?page=${pageNum}`
}
}
}
@@ -49,7 +45,7 @@ specified via the `number-of-pages` prop. Pages are numbers from `1` through to
To generate page links as [`
`](https://router.vuejs.org/api/#router-link) components
(or [``](https://nuxtjs.org/api/components-nuxt-link#the-lt-nuxt-link-gt-component) if
-[Nuxt.JS](https://nuxtjs.org/) is detected), set the `use-router` prop. The HREF will then become
+[Nuxt.js](https://nuxtjs.org/) is detected), set the `use-router` prop. The HREF will then become
the `to` prop of the router link. Or, optionally, use a link generator function to return a
router-link [`to` location](https://router.vuejs.org/api/#to) object.
@@ -71,7 +67,7 @@ reference section.
If you need finer grained control over the generated link URLs or `` `to` props, you
may set the `link-gen` prop to a function reference that receives two arguments: the page number,
and an object containing two fields (`link` and `page`), where `page` is the page number and `link`
-is the interally generated link.
+is the internally generated link.
The `link-gen` function should return either a string (for HREF) or a router `to` object. If the
returned value is an object, then a router-link will always be generated (if a `$router` is
@@ -79,32 +75,36 @@ detected). If the return value is a string, a standard link is generated by defa
`use-router` prop is set. If a `to` location object is used, then the `base-url` prop will have no
effect.
+
+
```js
-// For regular HREF (or string `to` prop if `use-router` is set)
-linkGen(pageNum) {
- return '/foo/page/' + pageNum
-}
+export default {
+ methods: {
+ // For regular HREF (or string `to` prop if `use-router` is set)
+ linkGen(pageNum) {
+ return `/foo/page/${pageNum}`
+ },
-// Returning a router-link `to` object
-linkGen(pageNum) {
- return {
- path: '/foo/page/' + pageNum
- }
-}
+ // Returning a router-link `to` object
+ linkGen(pageNum) {
+ return { path: `/foo/page/${pageNum}` }
+ },
-// Returning a router-link `to` object with query paramteres
-linkGen(pageNum) {
- return {
- path: '/foo/',
- query: { page: pageNum }
- }
-}
+ // Returning a router-link `to` object with query parameters
+ linkGen(pageNum) {
+ return {
+ path: '/foo/',
+ query: { page: pageNum }
+ }
+ },
-// Returning a router-link `to` object with named route and parameters
-linkGen(pageNum) {
- return {
- name: 'posts',
- params: { post: pageNum }
+ // Returning a router-link `to` object with named route and parameters
+ linkGen(pageNum) {
+ return {
+ name: 'posts',
+ params: { post: pageNum }
+ }
+ }
}
}
```
@@ -137,7 +137,7 @@ can use the scoped slot `page` for finer-grained formatting.
:link-gen="linkGen"
:page-gen="pageGen"
:number-of-pages="links.length"
- />
+ >
@@ -186,9 +186,9 @@ will be ignored.
```html
-
-
-
+
+
+