Skip to content

Commit 0881898

Browse files
committed
added new typescript defs
1 parent 0640bdd commit 0881898

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [1.0.1] - 2019-06-17
7+
## [1.0.1] - 2019-06-??
88
### Changed
99
- Fixed dependencies in `package.json`
10+
- Added new typescript defs (`bootstrap-switch-button-react.d.ts`)
1011

1112
## [1.0.0] - 2019-04-03
1213
### Added
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import * as React from "react";
2+
3+
export type Colors =
4+
| "primary"
5+
| "secondary"
6+
| "success"
7+
| "danger"
8+
| "warning"
9+
| "info"
10+
| "light"
11+
| "dark";
12+
13+
export type ColorsOutline =
14+
| "outline-primary"
15+
| "outline-secondary"
16+
| "outline-success"
17+
| "outline-danger"
18+
| "outline-warning"
19+
| "outline-info"
20+
| "outline-light"
21+
| "outline-dark";
22+
23+
interface BootstrapSwitchButtonProps {
24+
/**
25+
* Function to call when the SwitchButton is changed
26+
*/
27+
onChange?: (checked: boolean) => void;
28+
checked?: boolean;
29+
onlabel?: string;
30+
offlabel?: string;
31+
offstyle?: Colors | ColorsOutline;
32+
onstyle?: Colors | ColorsOutline;
33+
style?: string;
34+
}
35+
36+
declare class BootstrapSwitchButton extends React.Component<
37+
BootstrapSwitchButtonProps
38+
> {}
39+
40+
export default BootstrapSwitchButton;

0 commit comments

Comments
 (0)