aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/@next/components/newsletter_form.tsx
diff options
context:
space:
mode:
authorFred Carlsen <fred@sjelfull.no>2018-12-15 04:33:08 +0800
committerFred Carlsen <fred@sjelfull.no>2018-12-15 04:33:08 +0800
commitb07892bb48475e461e07926315a2e43ea5cfb46f (patch)
tree9b9aa3836c542b86468b86ead0dad2d62346aea0 /packages/website/ts/@next/components/newsletter_form.tsx
parentf0581285d0580062b29af3e0d5bc3af9d9e57d0d (diff)
downloaddexon-sol-tools-b07892bb48475e461e07926315a2e43ea5cfb46f.tar
dexon-sol-tools-b07892bb48475e461e07926315a2e43ea5cfb46f.tar.gz
dexon-sol-tools-b07892bb48475e461e07926315a2e43ea5cfb46f.tar.bz2
dexon-sol-tools-b07892bb48475e461e07926315a2e43ea5cfb46f.tar.lz
dexon-sol-tools-b07892bb48475e461e07926315a2e43ea5cfb46f.tar.xz
dexon-sol-tools-b07892bb48475e461e07926315a2e43ea5cfb46f.tar.zst
dexon-sol-tools-b07892bb48475e461e07926315a2e43ea5cfb46f.zip
Type fixes
Diffstat (limited to 'packages/website/ts/@next/components/newsletter_form.tsx')
-rw-r--r--packages/website/ts/@next/components/newsletter_form.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/website/ts/@next/components/newsletter_form.tsx b/packages/website/ts/@next/components/newsletter_form.tsx
index ba163449c..00770bb7d 100644
--- a/packages/website/ts/@next/components/newsletter_form.tsx
+++ b/packages/website/ts/@next/components/newsletter_form.tsx
@@ -6,6 +6,7 @@ import { colors } from 'ts/style/colors';
interface InputProps {
isSubmitted: boolean;
name: string;
+ type: string;
label: string;
}
@@ -13,14 +14,14 @@ interface ArrowProps {
isSubmitted: boolean;
}
-const Input: React.ReactNode = React.forwardRef((props: InputProps, ref) => {
- const { name, label } = props;
+const Input = React.forwardRef((props: InputProps, ref: React.Ref<HTMLInputElement>) => {
+ const { name, label, type } = props;
const id = `input-${name}`;
return (
<InnerInputWrapper {...props}>
<label className="visuallyHidden" htmlFor={id}>{label}</label>
- <StyledInput ref={ref} id={id} placeholder={label} {...props} />
+ <StyledInput ref={ref} id={id} placeholder={label} type={type || 'text'} {...props} />
</InnerInputWrapper>
);
});