fix: Update default button text handling and improve demo example in dees-form-submit
This commit is contained in:
@@ -5,7 +5,6 @@ import {
|
||||
css,
|
||||
cssManager,
|
||||
property,
|
||||
type CSSResult,
|
||||
} from '@design.estate/dees-element';
|
||||
import { DeesForm } from './dees-form.js';
|
||||
|
||||
@@ -17,7 +16,7 @@ declare global {
|
||||
|
||||
@customElement('dees-form-submit')
|
||||
export class DeesFormSubmit extends DeesElement {
|
||||
public static demo = () => html`<dees-form-submit>This is a sloted text</dees-form-submit>`;
|
||||
public static demo = () => html`<dees-form-submit>Submit Form</dees-form-submit>`;
|
||||
|
||||
@property({
|
||||
type: Boolean,
|
||||
@@ -38,17 +37,17 @@ export class DeesFormSubmit extends DeesElement {
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
||||
public static styles = [cssManager.defaultStyles, css``];
|
||||
|
||||
public render() {
|
||||
return html`
|
||||
<dees-button
|
||||
status=${this.status}
|
||||
@click=${this.submit}
|
||||
.disabled=${this.disabled}
|
||||
.text=${this.text ? this.text : this.textContent}
|
||||
status="${this.status}"
|
||||
@click="${this.submit}"
|
||||
?disabled="${this.disabled}"
|
||||
>
|
||||
${this.text || html`<slot></slot>`}
|
||||
</dees-button>
|
||||
`;
|
||||
}
|
||||
|
Reference in New Issue
Block a user