aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/@next/components/modals
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/modals
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/modals')
-rw-r--r--packages/website/ts/@next/components/modals/input.tsx6
-rw-r--r--packages/website/ts/@next/components/modals/modal_contact.tsx2
2 files changed, 7 insertions, 1 deletions
diff --git a/packages/website/ts/@next/components/modals/input.tsx b/packages/website/ts/@next/components/modals/input.tsx
index 33dfb1146..61663d906 100644
--- a/packages/website/ts/@next/components/modals/input.tsx
+++ b/packages/website/ts/@next/components/modals/input.tsx
@@ -13,7 +13,11 @@ interface InputProps {
type?: string;
}
-export const Input = React.forwardRef((props: InputProps, ref) => {
+interface LabelProps {
+ string: boolean;
+}
+
+export const Input = React.forwardRef((props: InputProps, ref?: React.Ref<HTMLInputElement>) => {
const { name, label, type } = props;
const id = `input-${name}`;
const componentType = type === 'textarea' ? 'textarea' : 'input';
diff --git a/packages/website/ts/@next/components/modals/modal_contact.tsx b/packages/website/ts/@next/components/modals/modal_contact.tsx
index fb16423a4..64e08c967 100644
--- a/packages/website/ts/@next/components/modals/modal_contact.tsx
+++ b/packages/website/ts/@next/components/modals/modal_contact.tsx
@@ -30,6 +30,7 @@ export class ModalContact extends React.Component<Props> {
isSuccessful: false,
errors: {},
};
+ public nameRef: React.RefObject<HTMLInputElement> = React.createRef();
public constructor(props: Props) {
super(props);
}
@@ -54,6 +55,7 @@ export class ModalContact extends React.Component<Props> {
label="Your name"
type="text"
width={InputWidth.Half}
+ ref={this.nameRef}
/>
<Input
name="email"