Skip to content
This repository has been archived by the owner on Jul 4, 2019. It is now read-only.
/ hyp Public archive

ϟ Functional UI component microlibrary with ES6 tagged template literals

Notifications You must be signed in to change notification settings

jxnblk/hyp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ϟ hyp

Build Status js-standard-style

WIP Functional UI component microlibrary with ES6 tagged template literal

npm i hyp
// Example component
import h from 'hyp'

const Button = ({
  text,
  ...props
}) => {
  const cx = {
    display: 'inline-block',
    fontFamily: 'inherit',
    fontSize: 'inherit',
    margin:0,
    padding: 8,
    border: 0,
    cursor: 'pointer',
    color: 'white',
    backgroundColor: 'black',
    MozAppearance: 'none',
    WebkitAppearance: 'none',
    ':hover': {
      backgroundColor: '#07c'
    }
  }

  return h`
    <button css=${cx} ${props}>
      ${text}
    </button>
  `
}

export default Button

About

hyp is a wrapper around the bel library that adds support for CSS-in-JS using cxs, which handles pseudoclasses and media queries in functional UI components.

Related libraries

MIT License

About

ϟ Functional UI component microlibrary with ES6 tagged template literals

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published