1.0.1 • Published 2 years ago
@fortit/fwc-main v1.0.1
<fwc-main>
Installation
npm i @fortit/fwc-main
Example usage
Standard
<script type="module">
import '@fortit/fwc-main';
</script>
<fwc-main>
<h1 slot="title">${msg(`Benutzer`)}</h1>
<mwc-button
slot="primary"
label="${msg('Erstellen')}"
@click="${() => this.addDialog.open()}"
unelevated
>
</mwc-button>
<fwc-card slot="content" padded>
<div>Some content</div>
</fwc-card>
</fwc-main>
With back button
<script type="module">
import '@fortit/fwc-main';
</script>
<fwc-main back>
<h1 slot="title">${msg(`Benutzer`)}</h1>
<mwc-button
slot="primary"
label="${msg('Erstellen')}"
@click="${() => this.addDialog.open()}"
unelevated
>
</mwc-button>
<fwc-card slot="content" padded>
<div>Some content</div>
</fwc-card>
</fwc-main>
With primary and secondary button
<script type="module">
import 'fortit/fwc-main';
</script>
<fwc-main>
<h1 slot="title">${this.goal.name}</h1>
<mwc-button
slot="primary"
label="${msg('Erstellen')}"
@click="${() => this.editDialog.open(id)}"
unelevated
>
</mwc-button>
<mwc-button
slot="secondary"
label="${msg('Canvas')}"
@click="${() => this.canvasDialog.open(id)}"
>
</mwc-button>
<fwc-card slot="content" padded>
<div>Some content</div>
</fwc-card>
</fwc-main>
API
Slots
Name | Description |
---|---|
content | Display the main content. |
primary | Primary button at the right top. |
secondary | Secondary button at the right top. |
title | Display the main title. |
Properties/Attributes
Name | Type | Default | Description |
---|---|---|---|
back | boolean | false | Display the back button |
Methods
None
Events
None
1.0.1
2 years ago
1.0.0
2 years ago
0.1.26
2 years ago
0.1.25
2 years ago
0.1.24
2 years ago
0.1.23
2 years ago
0.1.22
2 years ago
0.1.21
2 years ago
0.1.20
2 years ago
0.1.19
2 years ago
0.1.18
2 years ago
0.1.17
2 years ago
0.1.16
2 years ago
0.1.15
2 years ago
0.1.14
2 years ago
0.1.13
2 years ago
0.1.11
2 years ago
0.1.10
2 years ago
0.1.8
2 years ago
0.1.6
2 years ago
0.1.5
2 years ago
0.1.4
2 years ago
0.1.0
2 years ago