@source4society/react-scepter-logout-button
v1.0.0
Published
A logout/login button for SCEPTER style react projects.
Downloads
2
Readme
react-scepter-logout-button
A logout/login button that simply uses a react-router link component combined with a button element to redirect to the given path. It defaults to the login page by default. A SCEPTER style project often "logs the user out" when navigating to the login page and so this button simplifies development in such a project.
Installation
npm install @source4society/react-scepter-logout-button
or
yarn add @source4society/react-scepter-logout-button
Example
import LogoutButton from '@source4society/react-scepter-logout-button';
in your react component where the button shall be used. Then simply:
<LogoutButton />
If you wish to change some of the defaults, the prop list is as follows:
buttonText: String // Changes the label displayed on the button (default: Log Out)
logoutPath: String // Changes the path to where your logout logic is triggered (default: /login)
className: String // Custom class name applied to the button (default: '')