2020-11-16 11:53:10 +00:00
|
|
|
# Floating Button
|
|
|
|
|
|
|
|
Component that displays floating button
|
|
|
|
|
|
|
|
### Usage
|
|
|
|
|
|
|
|
```js
|
2021-02-25 21:19:45 +00:00
|
|
|
import FloatingButton from "@appserver/common/components/FloatingButton";
|
2020-11-16 11:53:10 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
```jsx
|
|
|
|
<FloatingButton icon="upload" alert={false} />
|
|
|
|
```
|
|
|
|
|
|
|
|
```jsx
|
2020-11-16 15:49:54 +00:00
|
|
|
<FloatingButton icon="trash" alert={true} percent={45} />
|
2020-11-16 11:53:10 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
### Properties
|
|
|
|
|
2020-11-18 11:58:30 +00:00
|
|
|
| Props | Type | Required | Values | Default | Description |
|
|
|
|
| ----------- | :------------: | :------: | :--------------------------------------------: | :------: | --------------------------- |
|
|
|
|
| `alert` | `bool` | - | - | `false` | Shows the alert |
|
|
|
|
| `className` | `string` | - | - | - | Accepts class |
|
|
|
|
| `icon` | `oneOf` | - | `upload`, `file`, `trash`, `move`, `duplicate` | `upload` | Sets the icon on the button |
|
|
|
|
| `id` | `string` | - | - | - | Accepts id |
|
|
|
|
| `percent` | `number` | - | - | `0` | Load fullness |
|
|
|
|
| `style` | `obj`, `array` | - | - | - | Accepts css style |
|