diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2021-04-03 18:05:49 +0900 |
---|---|---|
committer | Shin'ya Ueoka <ueokande@i-beam.org> | 2021-04-04 17:34:57 +0900 |
commit | d0495ce30e9aee853c23d70d512d845d6d131bb0 (patch) | |
tree | acbb548424b82a35ea12ce873357f50cef1e07ad /src | |
parent | 4d043107b80e104c3a029acb405dd69a8371a9a8 (diff) |
Fix props type
Diffstat (limited to 'src')
-rw-r--r-- | src/console/components/console/CompletionItem.tsx | 6 | ||||
-rw-r--r-- | src/console/components/console/CompletionTitle.tsx | 8 |
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; |