1.0.0 • Published 6 years ago

@source4society/react-scepter-logout-button v1.0.0

Weekly downloads
1
License
AGPL-3.0
Repository
github
Last release
6 years ago

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.

scepter-logo

redux-logo

react-boilerplate

airbnb-codestyle

Build Status

codecov

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: '')