react-zeplin-login
React component for a simple OAuth login with Zeplin.
🚀 Get Started
Follow these steps to start using React Zeplin Login:
-
Installation
# with npmnpm i react-zeplin-login# with yarnyarn add react-zeplin-login -
Import and configure component.
import React from "react";import ZeplinLogin from "react-zeplin-login";const authHandler = err dataconsole;;return<ZeplinLogin====/>;; -
Find more info about keys and OAuth apps in Zeplin official docs
📖 API
Property | Type | Default | Description |
---|---|---|---|
authCallback | function | required | Callback function which takes two arguments (error, authData) |
clientId | string | required | Client ID of your OAuth App |
clientSecret | string | required | Client Secret of your OAuth App |
redirectUri | string | required | Authorization callback URL of your OAuth App |
buttonTheme | enum("classic" , "light" , "light_short" , "dark" , "dark_short" ) |
"classic" |
Button style theme. Just "classic" is approved by Zeplin team, and de-facto is only one official option |
className | string | "" |
Custom class name |