Highlight text in table row details

Summary: Add prop for highlight color in DataInspector

Differential Revision: D40464529

fbshipit-source-id: 7113592c192b12504c0691d95663208181c1ad8c
This commit is contained in:
Guangming Mao
2022-10-19 10:35:39 -07:00
committed by Facebook GitHub Bot
parent d28aab50d7
commit 629bbe6c5a

View File

@@ -67,6 +67,11 @@ export type DataInspectorProps = {
*/
filter?: string;
/**
* Highlight color of the search text
*/
highlightColor?: string;
/**
* these should be ant design Menu.Item's
*/
@@ -202,7 +207,9 @@ export class DataInspector extends PureComponent<
return (
<Layout.Container onMouseLeave={this.removeHover}>
<RootDataContext.Provider value={this.getRootData}>
<HighlightProvider text={this.props.filter}>
<HighlightProvider
text={this.props.filter}
highlightColor={this.props.highlightColor}>
<DataInspectorNode
hoveredNodePath={this.state.hoveredNodePath}
setHoveredNodePath={this.setHoveredNodePath}