1.0.1 • Published 2 years ago

@fortit/fwc-main v1.0.1

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

<fwc-main> Published on npm

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

NameDescription
contentDisplay the main content.
primaryPrimary button at the right top.
secondarySecondary button at the right top.
titleDisplay the main title.

Properties/Attributes

NameTypeDefaultDescription
backbooleanfalseDisplay 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