-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…308)
- Loading branch information
1 parent
f5bba00
commit 186d21a
Showing
9 changed files
with
217 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,12 @@ | ||
@import 'multiple-select-vanilla/dist/styles/sass/themes/bootstrap.scss'; | ||
// 1- with legacy @import | ||
// $ms-primary-color: red; | ||
// $ms-checkbox-color: red; | ||
// $ms-parent-form-control-padding: 5px; | ||
// @import 'multiple-select-vanilla/dist/styles/sass/themes/bootstrap.scss'; | ||
|
||
// 2- or with modern @use | ||
// @use 'multiple-select-vanilla/dist/styles/sass/themes/bootstrap.scss' with ( | ||
// $ms-parent-form-control-padding: 5px, | ||
// $ms-primary-color: orange, | ||
// $ms-checkbox-color: orange, | ||
// ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,13 +29,13 @@ <h5>CDN</h5> | |
<div style="background: #f7f7f7; padding: 10px"> | ||
<pre> | ||
<!-- Latest compiled and minified CSS --> | ||
<link href="<span style="color:#880000">https://cdn.jsdelivr.net/npm/[email protected]/dist/styles/css/multiple-select.css</span>" rel="<span style="color:#880000">stylesheet</span>"> | ||
<link href="<span style="color:#0a3069">https://cdn.jsdelivr.net/npm/[email protected]/dist/styles/css/multiple-select.css</span>" rel="<span style="color:#0a3069">stylesheet</span>"> | ||
|
||
<!-- (ESM requires <span style="color:#d63384">type="module"</span>) Latest compiled and minified JavaScript --> | ||
<script type="module" src="<span style="color:#880000">https://cdn.jsdelivr.net/npm/[email protected]/dist/browser/multiple-select.js</span>"></script> | ||
<script type="module" src="<span style="color:#0a3069">https://cdn.jsdelivr.net/npm/[email protected]/dist/browser/multiple-select.js</span>"></script> | ||
|
||
<!-- (CJS requires <span style="color:#d63384">.cjs</span> extension) Latest compiled and minified JavaScript --> | ||
<script src="<span style="color:#880000">https://cdn.jsdelivr.net/npm/[email protected]/dist/browser/multiple-select.cjs</span>"></script></pre> | ||
<script src="<span style="color:#0a3069">https://cdn.jsdelivr.net/npm/[email protected]/dist/browser/multiple-select.cjs</span>"></script></pre> | ||
</div> | ||
|
||
<quote> | ||
|
@@ -59,26 +59,49 @@ <h5>CommonJS <code>require()</code> / ESM <code>import from</code></h5> | |
<div style="background: #f7f7f7; padding: 10px"> | ||
<pre> | ||
// CommonJS | ||
const { multipleSelect } = require('multiple-select-vanilla'); | ||
multipleSelect('.multiple-select', {/*...*/}); | ||
<span style="color:#cf222e">const</span> { multipleSelect } = <span style="color:#6639ba">require</span>(<span style="color:#0a3069">'multiple-select-vanilla'</span>); | ||
<span style="color:#6639ba">multipleSelect</span>(<span style="color:#0a3069">'.multiple-select'</span>, {<span style="color:#a0a1a7">/*...*/</span>}); | ||
|
||
// ESM | ||
import { multipleSelect } from 'multiple-select-vanilla'; | ||
multipleSelect('.multiple-select', {/*...*/}); | ||
<span style="color:#cf222e">import</span> { multipleSelect } <span style="color:#cf222e">from</span> <span style="color:#0a3069">'multiple-select-vanilla'</span>; | ||
<span style="color:#6639ba">multipleSelect</span>(<span style="color:#0a3069">'.multiple-select'</span>, {<span style="color:#a0a1a7">/*...*/</span>}); | ||
</pre> | ||
</div> | ||
|
||
<br> | ||
|
||
<section> | ||
<h5>Code Sample</h5> | ||
<div class="col-sm-10 col-lg-8"> | ||
<iframe | ||
style="height: 100%; width: 60%; position: absolute" | ||
src="data:text/html;charset=utf-8, | ||
<head><base target='_blank' /></head> | ||
<body><script src='https://gist.github.com/ghiscoding/786008e40a13d64a1cf813aff8a3d8dc.js'></script> | ||
</body>" | ||
> | ||
</iframe> | ||
<h5>CSS / SASS Styling Themes</h5> | ||
<p>Load default or Bootstrap Theme style via either the <code>@use</code> (modern) or <code>@import</code> (legacy)</p> | ||
|
||
1- with modern <code>@use</code> approach | ||
<div style="background: #f7f7f7; padding: 10px"> | ||
<pre> | ||
<span style="color:#cf222e">@use</span> <span style="color:#0a3069">'multiple-select-vanilla/dist/styles/sass/multiple-select.scss'</span> <span style="color:#cf222e">with</span> ( | ||
<span style="color:#986801">$ms-primary-color</span>: red, | ||
<span style="color:#986801">$ms-checkbox-color</span>: red, | ||
); | ||
</pre> | ||
</div> | ||
|
||
2- with legacy <code>@import</code> approach | ||
<div style="background: #f7f7f7; padding: 10px"> | ||
<pre> | ||
<span style="color:#986801">$ms-primary-color</span>: red; | ||
<span style="color:#986801">$ms-checkbox-color</span>: red; | ||
<span style="color:#cf222e">@import</span> <span style="color:#0a3069">'multiple-select-vanilla/dist/styles/sass/multiple-select.scss'</span>; | ||
</pre> | ||
</div> | ||
|
||
3- same goes for the Bootstrap Theme | ||
<div style="background: #f7f7f7; padding: 10px"> | ||
<pre> | ||
<span style="color:#cf222e">@use</span> <span style="color:#0a3069">'multiple-select-vanilla/dist/styles/sass/themes/bootstrap.scss'</span> <span style="color:#cf222e">with</span> ( | ||
<span style="color:#986801">$ms-parent-form-control-padding</span>: 5px, | ||
<span style="color:#986801">$ms-primary-color</span>: orange, | ||
<span style="color:#986801">$ms-checkbox-color</span>: orange, | ||
); | ||
</pre> | ||
</div> | ||
</section> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.