0.0.4 • Published 4 years ago

shp-ui-lib v0.0.4

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

shp-ui-lib

A simple and useful UI component library using typescript, react hooks, styled components

NPM JavaScript Style Guide

Intro

A simple and basic UI components library

Featured Components

  • Button

Installation

Run from shell npm install shp-ui-lib

Documentation

Button
PropertyDescriptionDefaultRequired
textText to show on buttonEmpty stringfalse
styleButton style. One of the following: primary, secondary, success, danger, warning, info, lightprimaryfalse
onClickFunction to execute on button clicktrue

##Example

import { useCallback } from 'react'
import {Button} from 'shp-ui-lib'

function App() {
  const onClickCallback = useCallback(() => {
    console.log('Clicked')
  }, [])

  return (
    <div>
      <Button type='primary' text={'Primary'} onClick={onClickCallback} /> 
      <Button type='secondary' text={'Secondary'} onClick={onClickCallback} />
      <Button type='success' text={'Success'} onClick={onClickCallback} />
      <Button type='danger' text={'Danger'} onClick={onClickCallback} />
      <Button type='warning' text={'Warning'} onClick={onClickCallback} />
      <Button type='info' text={'Info'} onClick={onClickCallback} />
      <Button type='light' text={'Light'} onClick={onClickCallback} />
    </div>
  )
}

export default App

License

MIT © Sharon Haim-Pour

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago