@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.
@@ -1,3 +1,6 @@
1
- import { FC } from 'react';
1
+ import { FC, ReactNode } from 'react';
2
2
 
3
- export declare const ApyCalculator: FC;
3
+ export interface ApyCalculatorProps {
4
+ header: ReactNode | string;
5
+ }
6
+ export declare const ApyCalculator: FC<ApyCalculatorProps>;
@@ -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__ */ jsxs("h1", { className: "header_1", children: [
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: [
@@ -1,4 +1,3 @@
1
- import { header } from './FaqAccordion.css';
2
1
  import { PropsWithChildren } from 'react';
3
2
 
4
3
  export interface AccordionItemProps extends PropsWithChildren {
@@ -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
  ) })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@axos-web-dev/shared-components",
3
3
  "description": "Axos shared components library for web.",
4
- "version": "0.0.45",
4
+ "version": "0.0.47",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",