@revolist/revo-dropdown
Advanced tools
Comparing version 1.0.6 to 1.0.8
{ | ||
"name": "@revolist/revo-dropdown", | ||
"version": "1.0.6", | ||
"version": "1.0.8", | ||
"description": "Minimalistic dropdown with keyboard support and search", | ||
@@ -61,7 +61,12 @@ "main": "dist/index.cjs.js", | ||
"@stencil/core": "^2.0.1", | ||
"@stencil/react-output-target": "0.0.9", | ||
"@stencil/angular-output-target": "0.0.5", | ||
"@stencil/svelte-output-target": "0.0.3", | ||
"@stencil/vue-output-target": "^0.2.5", | ||
"@stencil/sass": "^1.3.2", | ||
"husky": "^5.0.0-beta.0", | ||
"prettier": "^2.1.2", | ||
"pretty-quick": "^3.1.0" | ||
"pretty-quick": "^3.1.0", | ||
"svelte": "^3.31.2" | ||
} | ||
} |
@@ -15,33 +15,50 @@ # `revo-dropdown` | ||
```bash | ||
git clone https://github.com/revolist/revodropdown.git revo-dropdown | ||
cd revo-dropdown | ||
git remote rm origin | ||
npm i @revolist/revo-dropdown | ||
``` | ||
and run: | ||
```bash | ||
npm install | ||
npm start | ||
### Module import | ||
```js | ||
import * as loader from '@revolist/revo-dropdown/loader'; | ||
if (loader.defineCustomElements) { | ||
loader.defineCustomElements(); | ||
} | ||
``` | ||
To build the component for production, run: | ||
```bash | ||
npm run build | ||
``` | ||
### Script tag | ||
To run the unit tests for the components, run: | ||
- Put a script tag similar to this `<script src='https://unpkg.com/revo-dropdown@latest/dist/revo-dropdown.js'></script>` in the head of your index.html | ||
```bash | ||
npm test | ||
### Usage | ||
Then you can use the element anywhere in your template, JSX, html etc | ||
```html | ||
<revo-dropdown data-label="name" autocomplete="true" placeholder="Philosophers" max-height="300"></revo-dropdown> | ||
``` | ||
```js | ||
<script type="module"> | ||
const people = [ | ||
{ | ||
eyeColor: 'green', | ||
name: 'Samantha Molina', | ||
}, | ||
{ | ||
eyeColor: 'green', | ||
name: 'Weber Henderson', | ||
}]; | ||
const dropdowns = document.querySelectorAll('revo-dropdown'); | ||
for (var q = 0; q < dropdowns.length; q++) { | ||
dropdowns[q].source = people; | ||
} | ||
</script> | ||
``` | ||
Need help? Check out docs [here](https://stenciljs.com/docs/my-first-component). | ||
### Script tag | ||
- Put a script tag similar to this `<script src='https://unpkg.com/revo-dropdown@latest/dist/revo-dropdown.js'></script>` in the head of your index.html | ||
- Then you can use the element anywhere in your template, JSX, html etc | ||
# API | ||
@@ -48,0 +65,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
505548
132
10