3.0.36 • Published 5 years ago

the-button v3.0.36

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

the-button

Build Status npm Version JS Standard

Button of the-components

Installation

$ npm install the-button --save

Usage

Live Demo is hosted on GitHub Page

'use strict'

import React from 'react'
import { TheButton, TheButtonGroup, TheButtonStyle } from 'the-button'
import { TheRouter } from 'the-router'

class ExampleComponent extends React.PureComponent {
  handleClick = (e) => {
    console.log('clicked!', e)
  }

  render () {
    const { handleClick } = this
    return (
      <div>
        <TheRouter.Hash>
          <TheButtonStyle/>
          <TheButton onClick={handleClick}>Normal Button</TheButton>
          <TheButton primary onClick={handleClick}>Primary Button</TheButton>
          <TheButton disabled onClick={handleClick}>Disabled Button</TheButton>
          <TheButton spinning onClick={handleClick}>Spinning Button</TheButton>
          <TheButton light onClick={handleClick}>Light Button</TheButton>
          <TheButton simple onClick={handleClick}>Simple Button</TheButton>
          <TheButton danger onClick={handleClick}>Danger Button</TheButton>
          <TheButton wide onClick={handleClick}>Wide Button</TheButton>
          <TheButton large onClick={handleClick}>Large Button</TheButton>
          <TheButton rounded onClick={handleClick}>Rounded Button</TheButton>
          <TheButton rounded icon='fa fa-car' onClick={handleClick}>Rounded icon Button</TheButton>
          <TheButton rounded spinning onClick={handleClick}>Rounded Spinning Button</TheButton>
          <TheButton color='#83E' onClick={handleClick}>Color Button</TheButton>
          <TheButton color='#83E' primary onClick={handleClick}>Color Primary Button</TheButton>
          <TheButton color='#FFA' primary onClick={handleClick}>Color Primary Button2</TheButton>
          <TheButton rounded floated onClick={handleClick}>Round Float Button</TheButton>
          <TheButton to='/whatever'>Nav Button</TheButton>
          <TheButton.Prev to='#'>Go Left</TheButton.Prev>
          <TheButton.Next to='#'>Go Right</TheButton.Next>
          <TheButton icon='fa fa-car' text='Icon button'/>
          <TheButton largeIcon='fa fa-car' text='Large Icon button'/>
          <hr/>


          <TheButtonGroup>
            <TheButton onClick={handleClick}>Grouped Button 01</TheButton>
            <TheButton onClick={handleClick}>Grouped Button 02</TheButton>
          </TheButtonGroup>

          <br/>

          <TheButtonGroup collapsed>
            <TheButton onClick={handleClick}>Grouped Button 03</TheButton>
            <TheButton onClick={handleClick}>Grouped Button 04</TheButton>
            <TheButton onClick={handleClick}>Grouped Button 05</TheButton>
          </TheButtonGroup>

        </TheRouter.Hash>
      </div>

    )
  }
}

export default ExampleComponent

Components

TheButton

Button of the-components

Props

NameTypeDescriptionDefault
colorstringColor themenull
dangerboolDanger stylefalse
disabledboolDisabled statefalse
floatedboolFloated stylefalse
iconstringIcon classnull
largeboolLarge stylefalse
largeIconstringLarge icon classnull
lightboolLight colorfalse
minIntervalnumberMinimum interval300
onSubmitfuncHandle submitnull
primaryboolPrimary stylefalse
roundedboolRounded stylefalse
simpleboolSimple stylefalse
smallboolSmall stylefalse
spinningboolShow spinnerfalse
textstringButton textnull
wideboolWide stylefalse
role'button'

TheButtonGroup

Group of buttons

Props

NameTypeDescriptionDefault
alignenumDirection to align'center'
collapsedboolfalse

TheButtonStyle

Style for TheButton

Props

NameTypeDescriptionDefault
optionsobjectStyle options{}

License

This software is released under the MIT License.

Links

3.0.36

5 years ago

3.0.35

5 years ago

3.0.34

5 years ago

3.0.33

5 years ago

3.0.32

5 years ago

3.0.31

5 years ago

3.0.30

6 years ago

3.0.29

6 years ago

3.0.28

6 years ago

3.0.27

6 years ago

3.0.26

6 years ago

3.0.25

6 years ago

3.0.24

6 years ago

3.0.23

6 years ago

3.0.22

6 years ago

3.0.21

6 years ago

3.0.20

6 years ago

3.0.19

6 years ago

3.0.18

6 years ago

3.0.17

6 years ago

3.0.16

6 years ago

3.0.15

6 years ago

3.0.14

6 years ago

3.0.13

6 years ago

3.0.12

6 years ago

3.0.11

6 years ago

3.0.10

6 years ago

3.0.9

6 years ago

3.0.7

6 years ago

3.0.6

6 years ago

3.0.5

6 years ago

3.0.4

6 years ago

3.0.3

6 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.1.1

6 years ago

2.1.0

6 years ago

2.0.6

6 years ago

2.0.5

6 years ago

2.0.4

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.3.8

7 years ago

1.3.7

7 years ago

1.3.6

7 years ago

1.3.5

7 years ago

1.3.4

7 years ago

1.3.3

7 years ago

1.3.2

7 years ago

1.3.1

7 years ago

1.3.0

7 years ago

1.2.4

7 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago