mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-06 00:07:44 +01:00
34f848ce8a
* refactor: replace react-dnd with custom implementation * refactor: add TextCell, IconCell, and ActionCell * refactor: port environments list to react-table * refactor: change OfflineBolt to PowerSettingsNew * refactor: simplify environment toast text * refactor: improve IToast type type * refactor: improve useSearchHighlightContext naming * refactor: clarify enableDragAndDrop logic
10 lines
317 B
TypeScript
10 lines
317 B
TypeScript
import { createContext, useContext } from 'react';
|
|
|
|
const SearchHighlightContext = createContext('');
|
|
|
|
export const SearchHighlightProvider = SearchHighlightContext.Provider;
|
|
|
|
export const useSearchHighlightContext = (): { searchQuery: string } => {
|
|
return { searchQuery: useContext(SearchHighlightContext) };
|
|
};
|