Skip to content

Commit d750728

Browse files
committed
added distro table
1 parent 9658f4e commit d750728

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

README.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ Checkbox replacement using stylish bootstrap-4 switch button.
77
Lightweight (14kb), self-contained, compiled as a single common js file for easy webpack integration.
88

99
**************************************************************************************************
10+
11+
#### Library Distributions
12+
Project |Description
13+
-------------------------------------------------------------------------------------------|-------------------------------------------------------
14+
[bootstrap4-toggle](https://github.com/gitbrent/bootstrap4-toggle) | Supports bootstrap4 (requires jQuery)
15+
[bootstrap-switch-button](https://github.com/gitbrent/bootstrap-switch-button) | Supports bootstrap4+ (ES6 class, no dependencies)
16+
[bootstrap-switch-button-react](https://github.com/gitbrent/bootstrap-switch-button-react) | Supports bootstrap4+ (React component, no dependencies)
17+
18+
# Demos
19+
**Demos and API Docs:** https://gitbrent.github.io/bootstrap-switch-button/
20+
1021
```typescript
1122
<BootstrapSwitchButton
1223
checked={false}
@@ -20,16 +31,14 @@ Lightweight (14kb), self-contained, compiled as a single common js file for easy
2031

2132
![Demo GIF](https://github.com/gitbrent/bootstrap-switch-button-react/blob/master/img/demo.gif?raw=true)
2233

23-
Live demos and API docs: https://gitbrent.github.io/bootstrap-switch-button-react/
24-
**************************************************************************************************
2534

26-
## Installation
35+
# Installation
2736
```bash
2837
npm i bootstrap-switch-button-react --save-dev
2938
```
3039

3140

32-
## Usage
41+
# Usage
3342
Keep `state` in sync using the `onChange` function property
3443

3544
```typescript
@@ -49,7 +58,7 @@ import BootstrapSwitchButton from 'bootstrap-switch-button-react'
4958
```
5059

5160

52-
## Properties
61+
# Properties
5362
Name |Type |Default |Description |
5463
-----------|------------|----------|----------------------------|
5564
`onlabel` |string/html |"On" |Text of the on switch-button
@@ -60,3 +69,15 @@ Name |Type |Default |Description |
6069
`style` |string | |Appends the value to the class attribute of the switch-button. This can be used to apply custom styles. Refer to Custom Styles for reference.
6170
`width` |integer | |Sets the width of the switch-button. if set to *null*, width will be auto-calculated.
6271
`height` |integer | |Sets the height of the switch-button. if set to *null*, height will be auto-calculated.
72+
73+
74+
# Events
75+
Keep `state` in sync using the `onChange` function property
76+
77+
```typescript
78+
<BootstrapSwitchButton
79+
onChange={(checked: boolean) => {
80+
this.setState({ isUserAdmin: checked })
81+
}}
82+
/>
83+
```

0 commit comments

Comments
 (0)