mirror of
https://github.com/prymitive/karma
synced 2026-05-07 03:26:52 +00:00
Merge pull request #82 from prymitive/fix-highlighter
fix(ui): pass custom elements and classes instead of overriding defau…
This commit is contained in:
@@ -19,9 +19,3 @@ input.components-filterinput-wrapper {
|
||||
input.components-filterinput-wrapper:focus {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
/* highlighted part of the suggestion - phrase in the input that matches it */
|
||||
mark.highlight {
|
||||
padding: 0;
|
||||
background-color: inherit;
|
||||
}
|
||||
|
||||
@@ -102,7 +102,15 @@ const FilterInput = observer(
|
||||
};
|
||||
|
||||
renderSuggestion = (suggestion, { query, isHighlighted }) => {
|
||||
return <Highlight search={query}>{suggestion}</Highlight>;
|
||||
return (
|
||||
<Highlight
|
||||
matchElement="span"
|
||||
matchClass="font-weight-bold"
|
||||
search={query}
|
||||
>
|
||||
{suggestion}
|
||||
</Highlight>
|
||||
);
|
||||
};
|
||||
|
||||
renderInputComponent = inputProps => {
|
||||
|
||||
Reference in New Issue
Block a user