Compare commits

...

6 Commits

Author SHA1 Message Date
c1594736ec 1.0.41 2021-08-25 17:34:16 +02:00
4eb1abaa39 fix(core): update 2021-08-25 17:34:15 +02:00
b8c231fc61 1.0.40 2021-08-25 16:10:56 +02:00
260c4a269a fix(core): update 2021-08-25 16:10:56 +02:00
c1e7629f1f 1.0.39 2021-08-25 16:09:53 +02:00
b84e2c4774 fix(core): update 2021-08-25 16:09:52 +02:00
4 changed files with 26 additions and 10 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@designestate/dees-catalog",
"version": "1.0.38",
"version": "1.0.41",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@designestate/dees-catalog",
"version": "1.0.38",
"version": "1.0.41",
"license": "MIT",
"dependencies": {
"@designestate/dees-domtools": "^1.0.88",

View File

@ -1,6 +1,6 @@
{
"name": "@designestate/dees-catalog",
"version": "1.0.38",
"version": "1.0.41",
"private": false,
"description": "website for lossless.com",
"main": "dist_ts_web/index.js",

View File

@ -19,7 +19,7 @@ declare global {
@customElement('dees-button')
export class DeesButton extends DeesElement {
public static demo = () => html`<dees-button></dees-button>`;
public static demo = () => html`<dees-button>This is a slotted Text</dees-button>`;
@property()
public text: string;
@ -125,7 +125,7 @@ export class DeesButton extends DeesElement {
: null}"
@click="${this.dispatchClick}"
>
${this.text ? this.text : this.textContent}
${this.text ? this.text : html`<slot></slot>`}
</div>
`;
}

View File

@ -1,4 +1,11 @@
import { customElement, html, DeesElement, css, cssManager, property } from '@designestate/dees-element';
import {
customElement,
html,
DeesElement,
css,
cssManager,
property,
} from '@designestate/dees-element';
import { DeesForm } from './dees-form';
declare global {
@ -9,13 +16,18 @@ declare global {
@customElement('dees-form-submit')
export class DeesFormSubmit extends DeesElement {
public static demo = () => html`<dees-form-submit></dees-form-submit>`;
public static demo = () => html`<dees-form-submit>This is a sloted text</dees-form-submit>`;
@property({
type: Boolean
type: Boolean,
})
public disabled = false;
@property({
type: String,
})
public text: string;
constructor() {
super();
}
@ -23,11 +35,15 @@ export class DeesFormSubmit extends DeesElement {
public static styles = [cssManager.defaultStyles, css``];
public render() {
return html`<dees-button @click="${this.submit}" .disabled="${this.disabled}">${this.textContent}</dees-button> `;
return html`
<dees-button @click="${this.submit}" .disabled="${this.disabled}">
${this.text ? this.text : html`<slot></slot>`}
</dees-button>
`;
}
public async submit() {
if(this.disabled) {
if (this.disabled) {
return;
}
const parentElement: DeesForm = this.parentElement as DeesForm;