Skip to content

NSSTC/slim-fit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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');