Commit 67b2abad authored by Emily Jensen's avatar Emily Jensen

Story downloads pdf service

parent 24b1e339
......@@ -22,9 +22,11 @@ import { RouterTestingModule } from "@angular/router/testing";
import { ChangePasswordComponent } from "../app/account/change-password";
import { PasswordInputComponent } from "../app/account/change-password/password-input/password-input.component";
import { ManageBackupCodeComponent } from "../app/account/manage-backup-code/manage-backup-code.component";
import { BackupCodePdfService } from "../app/account/backup-code-pdf.service";
import { SetPasswordComponent } from "../app/account/reset-password/set-password/set-password.component";
import { ResetPasswordVerifyComponent } from "../app/account/reset-password/reset-password-verify/reset-password-verify.component";
storiesOf("Account", module)
.addDecorator(withKnobs)
.addDecorator(
......@@ -36,7 +38,7 @@ storiesOf("Account", module)
SharedModule,
RouterTestingModule,
ProgressIndicatorModule,
StoreModule.forRoot({})
StoreModule.forRoot({}),
],
declarations: [MarketingFrameComponent, PasswordInputComponent]
})
......@@ -120,14 +122,18 @@ storiesOf("Account", module)
errors: fromChangePassword.initialState.form.errors
}
}))
.add("Manage Backup Code", () => ({
component: ManageBackupCodeComponent,
props: {
form: fromChangePassword.initialState.form,
hasStarted: boolean("hasStarted", false),
hasFinished: boolean("hasFinished", false)
}
}))
.add("Manage Backup Code", () => {
const backupCodeToPdf = new BackupCodePdfService();
return ({
component: ManageBackupCodeComponent,
props: {
form: fromChangePassword.initialState.form,
hasStarted: boolean("hasStarted", true),
hasFinished: boolean("hasFinished", true),
downloadPDF: () => backupCodeToPdf.download("CBVDCH4G23MJ46FXJBR8GDX4WKBF97VR"),
},
});
})
.add("Set Password", () => ({
component: SetPasswordComponent,
props: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment