Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 415 Bytes

README.md

File metadata and controls

20 lines (14 loc) · 415 Bytes

slim-fit

Slim, opinionated WebComponent wrapper

How to use

import {SlimFit} from "slim-fit";

class MyComponent extends SlimFit {
    protected render() {
        // you may pass an HTMLElement or Node or Fragment for the first parameter, too
        this.draw('<strong>Hi!</strong>', 'strong { color: red; }');
    }
}

// register HTML-Tag-Name
MyComponent.registerTag('my-component');