All files / components/atajo/atajo-auth atajo-auth.tsx

83.33% Statements 5/6
100% Branches 0/0
50% Functions 1/2
83.33% Lines 5/6
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 381x                           1x           1x 1x 1x                              
import { Component, Prop } from "@stencil/core";
 
/**
 * Standards based Authentication component coupled with opinionated backend micro-service.
 *
 * Basic usage example:
 * ```html
 *  <script src="https://components.atajo.io/atajo-web-components.js"></script>
 *  <atajo-auth
 *    logo="https://www.bkb.co.za/wp-content/uploads/2018/01/BKB-nuwe-header.png"
 *    offline="true"
 *  />
 * ```
 */
@Component({
  tag: "atajo-auth",
  styleUrl: "atajo-auth.scss",
  shadow: true
})
export class AtajoAuthComponent {
  @Prop() logo: string = "../../assets/images/placeholder.logo.png";
  @Prop() offline: boolean = false;
  @Prop() labelSignIn: string = "Sign In";
 
  render() {
    return (
      <atajo-card>
        <atajo-logo src={this.logo} />
        <atajo-textfield label="Email Address" type="email" />
        <atajo-textfield label="Password" type="password" />
        <atajo-card-actions>
          <atajo-button raised fullwidth>{this.labelSignIn}</atajo-button>
        </atajo-card-actions>
      </atajo-card>
    );
  }
}