floating-action-btn
v1.0.3
Published
A customizable floating action button component for React applications.
Downloads
8
Maintainers
Readme
floating-action-btn
A customizable floating action button (FAB) component for React applications, with styled-components for styling.
Installation
Run the following command to install floating-action-btn
:
npm install floating-action-btn react styled-components
Usage
Import FloatingActionBtn
into your React component and use it like so:
import React from 'react';
import FloatingActionBtn from 'floating-action-btn';
import { ReactComponent as PlusIcon } from './plus-icon.svg'; // Your SVG icon
const App = () => {
const handleClick = () => {
console.log('FAB clicked');
};
return (
<div>
<FloatingActionBtn icon={<PlusIcon/>} onClick={handleClick}/>
</div>
);
};
export default App;