import styled from '@emotion/styled';
import { deburr } from 'lodash';
-import { createContext, useContext } from 'react';
+import * as React from 'react';
import Highlighter from 'react-highlight-words';
import { themeColor, themeContrast } from '../helpers/theme';
-export const SearchHighlighterContext = createContext<string | undefined>(undefined);
+export const SearchHighlighterContext = React.createContext<string | undefined>(undefined);
SearchHighlighterContext.displayName = 'SearchHighlighterContext';
interface Props {
}
export function SearchHighlighter({ children = '', term }: Props) {
- const query = useContext(SearchHighlighterContext);
+ const query = React.useContext(SearchHighlighterContext);
const searchTerm = term ?? query;
if (searchTerm) {
-webkit-text-decoration: none;
text-decoration: none;
outline: none;
- border: var(--border);
+ border: var(--border)!important;
color: var(--color);
background-color: var(--background);
-webkit-transition: background-color 0.2s ease,outline 0.2s ease;
-webkit-text-decoration: none;
text-decoration: none;
outline: none;
- border: var(--border);
+ border: var(--border)!important;
color: var(--color);
background-color: var(--background);
-webkit-transition: background-color 0.2s ease,outline 0.2s ease;