mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 05:31:49 +08:00
37 lines
807 B
HTML
37 lines
807 B
HTML
<link rel="import" href="../../../node_modules/@polymer/polymer/polymer-element.html">
|
|
|
|
<dom-module id="simple-button">
|
|
<template>
|
|
<style>
|
|
.simpleButton {
|
|
border: 1px solid black;
|
|
background-color: white;
|
|
}
|
|
</style>
|
|
<button on-click="handleClick" class="simpleButton">
|
|
[[title]]
|
|
</button>
|
|
</template>
|
|
|
|
<script>
|
|
class SimpleButton extends Polymer.Element {
|
|
static get is() { return 'simple-button'; }
|
|
|
|
static get properties() {
|
|
return {
|
|
title: {
|
|
type: String,
|
|
value: 'Button',
|
|
},
|
|
handleClick: {
|
|
type: Function,
|
|
value: () => {},
|
|
}
|
|
};
|
|
}
|
|
}
|
|
|
|
customElements.define(SimpleButton.is, SimpleButton);
|
|
</script>
|
|
</dom-module>
|