Skip to content

Commit

Permalink
add react types
Browse files Browse the repository at this point in the history
  • Loading branch information
SammCheese committed Feb 6, 2023
1 parent 30f3f20 commit 5d9e1e5
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"eslint-plugin-react": "^7.31.10",
"prettier": "^2.8.1",
"replugged": "4.0.0-beta0.25",
"typescript": "^4.8.4"
"typescript": "^4.8.4",
"@types/react": "^18.0.27"
}
}
22 changes: 22 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions src/components/DecryptionModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ function DecModal(props: ModalProps) {
</Modal.ModalHeader>
<Modal.ModalContent>
<Text.Eyebrow style={{ marginBottom: "5px" }}>Secret</Text.Eyebrow>
{/* @ts-expect-error types */}
<TextInput defaultValue={secret} disabled={true}></TextInput>
<Text.Eyebrow style={{ marginBottom: "5px" }}>Password</Text.Eyebrow>
<TextInput
Expand Down Expand Up @@ -65,7 +66,5 @@ function DecModal(props: ModalProps) {
}

export function buildDecModal(msg: any): any {
modalKey = openModal((props: JSX.IntrinsicAttributes & ModalProps) => (
<DecModal {...props} {...msg} />
));
modalKey = openModal((props: ModalProps) => <DecModal {...props} {...msg} />);
}
2 changes: 1 addition & 1 deletion src/components/EncryptionModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,5 @@ function EncModal(props: ModalProps) {
}

export function buildEncModal(): any {
modalKey = openModal((props: JSX.IntrinsicAttributes & ModalProps) => <EncModal {...props} />);
modalKey = openModal((props: ModalProps) => <EncModal {...props} />);
}

0 comments on commit 5d9e1e5

Please sign in to comment.