@axos-web-dev/shared-components 0.0.45 → 0.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,7 +8,7 @@ import { vars } from "../themes/axos.css.js";
|
|
|
8
8
|
/* empty css */
|
|
9
9
|
/* empty css */
|
|
10
10
|
import { apy_calculator, calculator_section, section_header, apy_calculator_form, errorTag, fieldset, field_row, relative, label_symbol, cash, prefix_pad, percent, submit_section, span_12, form_disclosure, marketing, marketing_tile, cta_section, marketing_table } from "./ApyCalculator.css.js";
|
|
11
|
-
const ApyCalculator = () => {
|
|
11
|
+
const ApyCalculator = ({ header }) => {
|
|
12
12
|
const [initialDeposit, setInititalDeposit] = useState(1e3);
|
|
13
13
|
const [APR, setAPR] = useState(2.32);
|
|
14
14
|
const [APY, setAPY] = useState(2.35);
|
|
@@ -97,10 +97,7 @@ const ApyCalculator = () => {
|
|
|
97
97
|
children: /* @__PURE__ */ jsxs("div", { className: `${apy_calculator} containment flex between`, children: [
|
|
98
98
|
/* @__PURE__ */ jsxs("div", { className: `${calculator_section}`, children: [
|
|
99
99
|
/* @__PURE__ */ jsxs("div", { className: `${section_header}`, children: [
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
-
"APY Interest Calculator",
|
|
102
|
-
/* @__PURE__ */ jsx("sup", { children: "3" })
|
|
103
|
-
] }),
|
|
100
|
+
/* @__PURE__ */ jsx("h1", { className: "header_1", children: header }),
|
|
104
101
|
/* @__PURE__ */ jsx("p", { className: "push_up", children: "Calculate how much interest you can earn on your money with our APY Interest Calculator." })
|
|
105
102
|
] }),
|
|
106
103
|
/* @__PURE__ */ jsxs("form", { id: "calculator_form", className: `${apy_calculator_form}`, children: [
|
|
@@ -66,7 +66,7 @@ const ScheduleCall = ({
|
|
|
66
66
|
const {
|
|
67
67
|
handleSubmit,
|
|
68
68
|
register,
|
|
69
|
-
formState: { errors, isValid }
|
|
69
|
+
formState: { errors, isValid, isSubmitting }
|
|
70
70
|
} = methods;
|
|
71
71
|
const submitForm = async (data) => {
|
|
72
72
|
await onSubmit(data);
|
|
@@ -155,7 +155,7 @@ const ScheduleCall = ({
|
|
|
155
155
|
color: getVariant(callToAction == null ? void 0 : callToAction.variant),
|
|
156
156
|
as: "button",
|
|
157
157
|
type: "submit",
|
|
158
|
-
disabled: !isValid,
|
|
158
|
+
disabled: !isValid || isSubmitting,
|
|
159
159
|
children: callToAction == null ? void 0 : callToAction.displayText
|
|
160
160
|
}
|
|
161
161
|
) })
|