Skip to content
Snippets Groups Projects
Commit 3d6bd892 authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire:
Browse files

Expose all common components in components.js

parent 4bcfe159
Branches
No related tags found
No related merge requests found
Pipeline #45580 passed
......@@ -11,7 +11,8 @@ npm i @dbp-toolkit/common
For valid icon names see: [LineIcons](https://lineicons.com/icons/)
```html
<dbp-icon color="orange" name="menu-down"></dbp-icon>
<script type="module" src="https://unpkg.com/@dbp-toolkit/common@0.2.8/dist/components.js"></script>
<dbp-icon style="color: red" name="menu-down"></dbp-icon>
```
### Exposed CSS variables
......@@ -25,6 +26,7 @@ Example CSS: `html { --dbp-override-icon-cloud: url(/icons/cloud.svg); }`
You can use this web component to show translated html.
```html
<script type="module" src="https://unpkg.com/@dbp-toolkit/common@0.2.8/dist/components.js"></script>
<dbp-translated subscribe="lang">
<div slot="de">
Dieser Text ist Deutsch und wird Englisch werden wenn man die Sprache auf Englisch stellt.
......
import * as commonUtils from "./utils";
import {Button, Icon, InlineNotification, LoadingButton, MiniSpinner, Spinner, Translated} from "./index";
commonUtils.defineCustomElement('dbp-mini-spinner', MiniSpinner);
commonUtils.defineCustomElement('dbp-spinner', Spinner);
commonUtils.defineCustomElement('dbp-icon', Icon);
commonUtils.defineCustomElement('dbp-button', Button);
commonUtils.defineCustomElement('dbp-loading-button', LoadingButton);
commonUtils.defineCustomElement('dbp-inline-notification', InlineNotification);
commonUtils.defineCustomElement('dbp-translated', Translated);
import * as commonUtils from "./utils";
import {Icon} from "./src/icon";
commonUtils.defineCustomElement('dbp-icon', Icon);
{
"name": "@dbp-toolkit/common",
"homepage": "https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/common",
"version": "0.2.7",
"version": "0.2.8",
"module": "index.js",
"license": "LGPL-2.1-or-later",
"repository": {
......
......@@ -13,7 +13,7 @@ console.log("build: " + build);
export default (async () => {
return {
input: (build !='test') ? ['demo.js', 'icon.js'] : glob.sync('test/**/*.js'),
input: (build !='test') ? ['demo.js', 'components.js'] : glob.sync('test/**/*.js'),
output: {
dir: 'dist',
entryFileNames: '[name].js',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment