diff --git a/src/console/components/console/CompletionItem.tsx b/src/console/components/console/CompletionItem.tsx index 394af041..415fecb5 100644 --- a/src/console/components/console/CompletionItem.tsx +++ b/src/console/components/console/CompletionItem.tsx @@ -3,10 +3,11 @@ import styled from "../../colorscheme/styled"; const Container = styled.li<{ shown: boolean; - icon: string; + icon?: string; highlight: boolean; }>` - background-image: ${({ icon }) => "url(" + icon + ")"}; + background-image: ${({ icon }) => + typeof icon !== "undefined" ? "url(" + icon + ")" : "unset"}; background-color: ${({ highlight, theme }) => highlight ? theme.completionSelectedBackground @@ -15,7 +16,7 @@ const Container = styled.li<{ highlight ? theme.completionSelectedForeground : theme.completionItemForeground}; - display: ${({ shown }) => (shown ? "display" : "none")}; + display: ${({ shown }) => (shown ? "block" : "none")}; padding-left: 1.8rem; background-position: 0 center; background-size: contain; @@ -47,11 +48,7 @@ interface Props extends React.HTMLAttributes { } const CompletionItem: React.FC = (props) => ( - + {props.primary} {props.secondary}