Skip to content
This repository has been archived by the owner on Nov 29, 2020. It is now read-only.

divlook-fancy/chain-element

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

Example

Default

import { createElement, mount } from '@divlook/chain-element'
import { addStyle } from '@divlook/chain-element/action'

const black = addStyle({ color: '#000' })
const app = createElement('div').use(black)

mount(document.body, app)
mount('#app', app)

app.toString()
// <div style="color: #fff"></div>

Compose

import { createElement, compose } from '@divlook/chain-element'
import { addStyle } from '@divlook/chain-element/action'

const white = addStyle({ color: '#fff' })
const bold = addStyle({ textWeight: 600 })
const options = compose(white, bold)

createElement('span').use(options)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published