Part of the reusable Tradeshift UI Components as Web Components. Demo
table { width:100%; }Property | Attribute | Type | Default | Description |
---|---|---|---|---|
icon | icon | String | ||
type | type | String | ||
dir | dir | String | ltr | |
closeable | closeable | Boolean | false | |
hidden | hidden | Boolean | false | |
buttons | buttons | Array |
Name | Description |
---|---|
default |
Name | Description |
---|---|
close | |
button-click |
$ npm i @tradeshift/elements.note --save
import '@tradeshift/elements.note';
or
<script src="node_modules/@tradeshift/elements.note/lib/note.umd.js"></script>
Use it like demo
Our components rely on having the Open Sans
available, You can see the font-weight
and font-style
you need to load here, or you can just load it from our package (for now)
<link rel="stylesheet" href="node_modules/@tradeshift/elements/src/fonts.css" />
For supporting IE11 you need to add couple of things
<!-- Place this in the <head>, before the Web Component polyfills are loaded -->
<script>
if (!window.Promise) {
window.ShadyCSS = { nativeCss: true };
}
</script>
$ npm i @open-wc/polyfills-loader
import loadPolyfills from '@open-wc/polyfills-loader';
loadPolyfills().then(() => import('./my-app.js'));
$ npm i @webcomponents/webcomponentsjs --save
<script src="/node_modules/@webcomponents/webcomponentsjs/custom-elements-es5-adapter.js"></script>
@webcomponents/webcomponentsjs
<script src="/node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js" defer></script>
Thanks for your interest and help!
You can find some links to useful materials about what we are using and some tutorials and articles that can help you get started.
You can see a list of limitations that we should watch out for, here
You can read the full license agreement in the LICENSE.md.
Version | Tag | Published |
---|---|---|
0.38.0 | latest | 2mos ago |