@source4society/react-scepter-logout-button

1.0.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @source4society/react-scepter-logout-button

Weekly Downloads

1

Version

1.0.0

License

AGPL-3.0

Unpacked Size

86.6 kB

Total Files

23

Last publish

Collaborators

  • danfredriksen