mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-14 18:42:30 +03:00
Docs: update documentation js examples, using es6 (#36203)
* Docs: update components documentation using es6 * Docs: update js blocks around docs, using es6 * Docs: update components documentation using es6 * Test linter
This commit is contained in:
@@ -21,6 +21,7 @@ Bootstrap's JavaScript includes every component in our primary dist files (`boot
|
||||
|
||||
For instance, assuming you're using your own JavaScript bundler like Webpack or Rollup, you'd only import the JavaScript you plan on using. In the example below, we show how to just include our modal JavaScript:
|
||||
|
||||
<!-- eslint-skip -->
|
||||
```js
|
||||
// Import just what we need
|
||||
|
||||
@@ -45,6 +46,7 @@ This way, you're not including any JavaScript you don't intend to use for compon
|
||||
|
||||
Files in `bootstrap/js/dist` use the **default export**, so if you want to use one of them you have to do the following:
|
||||
|
||||
<!-- eslint-skip -->
|
||||
```js
|
||||
import Modal from 'bootstrap/js/dist/modal'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user