From 254383371decf5c52d921e66fb1c60be32bbfb34 Mon Sep 17 00:00:00 2001
From: snewcomer24
Date: Mon, 18 Dec 2017 21:56:47 -0800
Subject: [PATCH] rearrange error setter close #22
---
README.md | 12 ++++++------
addon/components/stripe-element.js | 11 ++++++-----
addon/templates/components/stripe-card-cvc.hbs | 2 +-
addon/templates/components/stripe-card-expiry.hbs | 2 +-
addon/templates/components/stripe-card-number.hbs | 2 +-
addon/templates/components/stripe-card.hbs | 2 +-
addon/templates/components/stripe-postal-code.hbs | 2 +-
tests/dummy/app/templates/application.hbs | 6 +++---
tests/integration/components/stripe-card-test.js | 11 +++++++++++
9 files changed, 31 insertions(+), 19 deletions(-)
diff --git a/README.md b/README.md
index 04c5273..74b2211 100644
--- a/README.md
+++ b/README.md
@@ -98,7 +98,7 @@ Every component will:
The components bubble up all of [the JavaScript events that can be handled by the Stripe Element in `element.on()`](https://stripe.com/docs/elements/reference#element-on) from the Ember component using the following actions:
- `blur`
-- `change` (also sets/unsets the `error` property on the component, which can be yielded with the block)
+- `change` (also sets/unsets the `stripeError` property on the component, which can be yielded with the block)
- `focus`
You could handle these actions yourself, for example:
@@ -119,14 +119,14 @@ This addon gives you components that match the different [Element types](https:/
### Block usage with `options`
-In addition to the simple usage above, like `{{stripe-card}}`, you can also yield to a block, which will yield both an `error` object and [the `stripeElement` itself](https://stripe.com/docs/elements/reference#the-element).
+In addition to the simple usage above, like `{{stripe-card}}`, you can also yield to a block, which will yield both an `stripeError` object and [the `stripeElement` itself](https://stripe.com/docs/elements/reference#the-element).
-For example, you can choose to render out the `error`, as below (runnable in our dummy app).
+For example, you can choose to render out the `stripeError`, as below (runnable in our dummy app).
```hbs
-{{#stripe-card options=options as |stripeElement error|}}
- {{#if error}}
-
{{error.message}}
+{{#stripe-card options=options as |stripeElement stripeError|}}
+ {{#if stripeError}}
+