0.6.0 • Published 8 months ago

mirlo v0.6.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Static Badge Tests

Installation

npm i mirlo --save-dev

Basic Example

  • HTML:
<template id="template-mirlo-demo">
  <span id="msg"></span>
</template>

<mirlo-demo id="demo"></mirlo-demo>
  • JS 'Component':
import {Component, registerComponent} from 'mirlo';

export default class Demo extends Component {
  onSetup() {
    Component.useStateBinds({
      msg: {
        id: 'msg',
        attribute: 'html',
      },
    });
    Component.useEvents({
      msg: {
        mode: 'id',
        events: {
          click: this.onClickMessage,
        },
      },
    });
  }

  onStart() {
    super.onStart();
    this.mirlo.state.msg = '<strong>Hello World!</strong>';
  }

  onClickMessage() {
    this.mirlo.state.msg = '<strong>Clicked!</strong>';
  }
}

registerComponent('demo', Demo);
  • JS 'Main':
import './components/demo01';

Documentation

https://tardo.github.io/mirlo/

0.6.0

8 months ago

0.5.0

9 months ago

0.4.0

2 years ago

0.3.0

2 years ago

0.3.1

2 years ago

0.2.0

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago