ButtonLogin

Overview

Button that once clicked will invoke the MSAL libraries to sign the user in. This can be used as a separate component, however it is also part of the AuthWrapper component

Tip

  • The component has been provided all the defaults needed to work within a standard SKA application.

../_images/buttonlogin.png
Example : Default usage
import { ButtonLogin } from '@ska-telescope/ska-login-page';

...

<ButtonLogin />
Properties

Property

Type

Required

Notes

ariaDescription

string

No

Used by Screen Readers

color

ButtonColorTypes

No

Default : ButtonColorTypes.Secondary

disabled

boolean

No

Disabled when true, default is false

icon

JSX.Element | string

No

Standard Login Icon is displayed

label

string

No

Default : Sign in

loginRequest

RedirectRequest

No

Allows for the default to be overridden

onSuccess

Function

No

Determines action(s) to be taken upon an successful login, once redirected to the application

onError

Function

No

Determines action(s) to be taken upon an error condition

size

ButtonSizeTypes

No

Default : ButtonSizeTypes.Medium

testId

string

No

Default : buttonLogin-{{label}}. Identifier for testing purposes

toolTip

string

No

Default : Successful sign in will provide to access user specific features

variant

ButtonVariantTypes

No

Default : ButtonVariantTypes.Contained

Constants

Constant

Possible Values

Usage

ButtonColorTypes

Error,Inherit,Secondary,Success,Warning

Button coloring

ButtonSizeTypes

Small, Medium, Large

Button sizing

ButtonVariantTypes

Contained,Outlined,Text

Button styling

Testing Identifier

Provided by the property testId