aboutsummaryrefslogtreecommitdiff
path: root/src/console
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2021-04-03 18:05:49 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2021-04-04 17:34:57 +0900
commitd0495ce30e9aee853c23d70d512d845d6d131bb0 (patch)
treeacbb548424b82a35ea12ce873357f50cef1e07ad /src/console
parent4d043107b80e104c3a029acb405dd69a8371a9a8 (diff)
Fix props type
Diffstat (limited to 'src/console')
-rw-r--r--src/console/components/console/CompletionItem.tsx6
-rw-r--r--src/console/components/console/CompletionTitle.tsx8
2 files changed, 6 insertions, 8 deletions
diff --git a/src/console/components/console/CompletionItem.tsx b/src/console/components/console/CompletionItem.tsx
index 5f2f9f6..2451d87 100644
--- a/src/console/components/console/CompletionItem.tsx
+++ b/src/console/components/console/CompletionItem.tsx
@@ -38,7 +38,7 @@ const Description = styled.span`
overflow: hidden;
`;
-interface Props {
+interface Props extends React.HTMLAttributes<HTMLElement> {
shown: boolean;
highlight: boolean;
caption?: string;
@@ -46,9 +46,7 @@ interface Props {
icon?: string;
}
-const CompletionItem: React.FC<React.HTMLAttributes<HTMLElement> & Props> = (
- props
-) => (
+const CompletionItem: React.FC<Props> = (props) => (
<Container
icon={props.icon || ""}
aria-labelledby={`completion-item-${props.caption}`}
diff --git a/src/console/components/console/CompletionTitle.tsx b/src/console/components/console/CompletionTitle.tsx
index ec2fc8b..5594eb3 100644
--- a/src/console/components/console/CompletionTitle.tsx
+++ b/src/console/components/console/CompletionTitle.tsx
@@ -10,13 +10,13 @@ const Li = styled.li<{ shown: boolean }>`
padding: 0;
`;
-interface Props {
+interface Props extends React.HTMLAttributes<HTMLElement> {
shown: boolean;
title: string;
}
-const CompletionTitle: React.FC<React.HTMLAttributes<HTMLElement> & Props> = (
- props
-) => <Li {...props}>{props.title}</Li>;
+const CompletionTitle: React.FC<Props> = (props) => (
+ <Li {...props}>{props.title}</Li>
+);
export default CompletionTitle;