Skip to content

Commit 2b28635

Browse files
committed
add documentation
1 parent f3f7ecc commit 2b28635

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

src/snackbar/readMe.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## Button
2+
3+
The base Snackbar component.
4+
5+
### Properties
6+
| Name | Type | Default | Description |
7+
|:-----|:-----|:-----|:-----|
8+
| `children` | `Any` | `null` | All children components to be rendered inside the Snackbar |
9+
| `timeout` | `Number` | 2000 | Timeout to auto hide the snackbar |
10+
| `autoClose` | `Boolean` | true | Prop to decide whether the snackbar should close automatically after the given timeout or not |
11+
| `onClose` | `function` | null | The callback function to be called when the snackbar closes |
12+
| `position` | `String` | `bottom` | The position at which the snackbar should be show. The possible values are `top`, `bottom` |
13+
14+
### Theme
15+
16+
| Name | Description|
17+
|:---------|:-----------|
18+
| `snackbar` | Class used for the snackbar element.|
19+
| `snackbarWrapper` | Class used for snackbar wrapper element |
20+
21+
### Usage
22+
23+
```
24+
<div>
25+
<Snackbar
26+
active={this.state.showIndefiniteSnackbar}
27+
onClose={this.handleSnackClose}
28+
autoClose={false}>
29+
<span>This is a indefinite snackbar.</span>
30+
</Snackbar>
31+
</div>
32+
```

0 commit comments

Comments
 (0)