1.0.6 • Published 6 months ago

react-floating-button-cpress v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

An Awesome & Unique Customizable Floating Button

Build & Run

Install

With npm

npm install react-floating-button-cpress

Usage

import { FloatingButton, Item } from "react-floating-button";
import downloadIcon from "./assets/DOWNLOAD.svg";
import forwardIcon from "./assets/FORWARD.svg";

<FloatingButton>
  <Item
    imgSrc={downloadIcon}
    onClick={() => {
      console.log("callback function here");
    }}
  />
  <Item
    imgSrc={forwardIcon}
    onClick={() => {
      console.log("callback function here");
    }}
  />
</FloatingButton>;

Options

FloatingButton

PropertyDescriptionTypeDefault
rightSpecify if the button should be on the right if false the button will be at the leftbooleantrue
topSpecify if the button should be on the right if false the button will be at the leftbooleanfalse
sizeThe size used for the buttonsnumber60
backgroundColorThe backgroundColor for the main buttonstring#8f1d30
colorThe color for the burger iconstring#dbdbdb

Item

PropertyDescriptionTypeDefault
imgSrcThe icon to use on given buttonstring-
backgroundColorThe backgroundColor for the Itemstring#dbdbdb
onClickCalled when an item is clickedfunc-

Attribution

License

The code is available under the MIT license.

1.0.6

6 months ago

1.0.5

6 months ago

1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

1.0.0

6 months ago