GithubSignInButton
A button with GitHub label and status indicator used to sign in with GitHub.
Props:
title
Description: Button title. Type: String. Required.
onClick
Description: Function to invoke on click. Type: Async Function. Required.
loading
Description: Render a loading animation if true. Type: Boolean. Default: False.
disabled
Description: Disables the component if true. Type: Boolean. Default: False.
animationType
Description: Animation type. Type: "bars" | "bubbles" | "balls" | "blank" | "cylon" | "spin" | "spokes" |"cubes" | "spinningBubbles". Default: "bubbles".
themeColor
Description: Button style. Type: CSS Properties.
style
Description: Button style. Type: CSS Properties.
className
Description: Button className. Type: "dark" | "light". Default: "light".
Code
const [loading, setLoading] = useState(false) async function signIn() { setLoading(true) const timer = setTimeout(() => { setLoading(false) return () => clearTimeout(timer) }, 1000) } <GithubSignInButtonComponent title='Login with GitHub' onClick={sign} disabled={loading} loading={loading} />