askalfred-ui

1.2.0 • Public • Published

askalfred-ui

ui for AskAlfred

NPM JavaScript Style Guide

Install

npm install --save askalfred-ui

or

yarn add askalfred-ui

Scripts

yarn test             // run tests
yarn test:watch       // run tests and keep watching
yarn storybook        // run to start storybook
yarn build-storybook  // run before starting storybook

Components

Alert

import React, { Component } from 'react'

import MyComponent from 'askalfred-ui'

class Example extends Component {
  render () {
    return (
      <Alert
        type={'success'}
        message={'Hurray! Everything went well!'}
        show={'true'}
      />
    )
  }
}
Props Type options
type string ['error', 'info', 'success', 'warning', 'light', 'dark']
message string *
show boolean *

PageLayout

import React, { Component } from 'react'

import MyComponent from 'askalfred-ui'

class Example extends Component {
  list = () => {
    return [
      <div>
        item 1
      <div>,
      <div>
        item 2
      <div>
    ]
  }

  render () {
    return (
      <PageLayout
        list={this.list()}
        listHeader={'Some list header'}
        contentHeader={'some header'}
      >
        Content
      </PageLayout>
    )
  }
}
Props Type options
list array *
listHeader string *
contentHeader boolean *

License

private © aa-patrickg

Readme

Keywords

none

Package Sidebar

Install

npm i askalfred-ui

Weekly Downloads

2

Version

1.2.0

License

none

Unpacked Size

390 kB

Total Files

8

Last publish

Collaborators

  • patrick-askalfred