2.0.10 • Published 5 years ago

the-bar v2.0.10

Weekly downloads
3
License
MIT
Repository
github
Last release
5 years ago

the-bar

Build Status npm Version JS Standard

Bar of the-components

Installation

$ npm install the-bar --save

Usage

'use strict'

import React from 'react'
import { TheBar, TheActionBar, TheBarStyle } from 'the-bar'
import { TheButtonStyle } from 'the-button'

class ExampleComponent extends React.Component {
  constructor (props) {
    super(props)
    this.state = {
      action: true
    }
  }

  render () {
    return (
      <div>
        <a onClick={() => this.setState({action: !this.state.action})}>Toggle Action bar</a>
        <br/>
        <TheButtonStyle/>
        <TheBarStyle/>
        <TheBar id='my-component'>
        </TheBar>

        <TheActionBar lead='doSomething'
                      hidden={!this.state.action}
                      buttons={{yes: 'say yes!', no: 'say no!'}}
                      handlers={{yes: () => console.log('yes'), no: () => console.log('no')}}
        />
      </div>

    )
  }
}

export default ExampleComponent

Components

TheActionBar

Bar of the-component

Props

NameTypeDescriptionDefault
buttonsobjectButton texts{}
dangerobjectDanger marks{}
handlersobjectHandler functions{}
hiddenboolHidden or notfalse
iconsobjectIcon class names{}
leadstringLead text

TheBar

Bar of the-component

TheBarStyle

Style for TheBar

Props

NameTypeDescriptionDefault
optionsobjectStyle options{}

License

This software is released under the MIT License.

Links

2.0.10

5 years ago

2.0.9

6 years ago

2.0.8

6 years ago

2.0.7

6 years ago

2.0.6

6 years ago

2.0.5

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago