aphix-ui

0.5.9 • Public • Published

aphix-ui

UI library based on material-ui and emotion

NPM JavaScript Style Guide

Install

npm install --save aphix-ui

Usage

import * as React from 'react'

import Button from 'aphix-ui'

class Example extends React.Component {
  buttonOnClick = () => alert('you just clicked on a button');
  render () {
    return (
      <Button type={'button'} onClick={buttonOnClick}>ClickMe!</Button>
    )
  }
}

Global Styles & Theme Provider

in App.js/ts use GlobalStyles and ThemeProvider as described below

import React from 'react'
import {
  Button, 
  GlobalStyles, 
  globalStyles, 
  ThemeProvider, 
  defaultTheme
} from 'aphix-ui';

export default class App extends Component {
  render () {
    return (
      <div>
        <GlobalStyles styles={globalStyles}/>
        <ThemeProvider theme={defaultTheme}>
          <Button buttonType={'error'}>Some error button?</Button>
          <Button type={'button'} buttonType={'primary'}>Primary, huh!?</Button>
        </ThemeProvider>
      </div>
    )
  }
}

Components

All components use Material-UI API with addition to some extra props that are added to extend Material-UI.

License

MIT © Aphix Software Ltd

/aphix-ui/

    Package Sidebar

    Install

    npm i aphix-ui

    Weekly Downloads

    0

    Version

    0.5.9

    License

    MIT

    Unpacked Size

    11.4 MB

    Total Files

    6

    Last publish

    Collaborators

    • ivan-aphix