]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-19711 Move table header form to the new UI
authorstanislavh <stanislav.honcharov@sonarsource.com>
Fri, 30 Jun 2023 07:57:23 +0000 (09:57 +0200)
committersonartech <sonartech@sonarsource.com>
Fri, 30 Jun 2023 20:03:15 +0000 (20:03 +0000)
server/sonar-web/design-system/src/components/SearchHighlighter.tsx
server/sonar-web/design-system/src/components/__tests__/__snapshots__/CodeSnippet-test.tsx.snap
server/sonar-web/design-system/src/components/buttons.tsx

index 54ff99387663c49b9e1f6d2901226564ec3e5aeb..95f160deab3e4f3ca7571b60f0fa65c462bf5f29 100644 (file)
 
 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 {
@@ -33,7 +33,7 @@ interface Props {
 }
 
 export function SearchHighlighter({ children = '', term }: Props) {
-  const query = useContext(SearchHighlighterContext);
+  const query = React.useContext(SearchHighlighterContext);
 
   const searchTerm = term ?? query;
   if (searchTerm) {
index 589692fbb31777a32854b09f24091f3d8b1a2251..84ed10557aa7ee3739f1a98b50ca52e84fe1d59a 100644 (file)
@@ -21,7 +21,7 @@ exports[`should show full size when multiline with no editting 1`] = `
   -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;
@@ -221,7 +221,7 @@ exports[`should show reduced size when single line with no editting 1`] = `
   -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;
index c037c533d276665e5125e8dbbff9042df4fb839a..d5dc804a097f07f1617b9a460c5f9aed09fd47d0 100644 (file)
@@ -110,7 +110,7 @@ const buttonStyle = (props: ThemedProps) => css`
   box-sizing: border-box;
   text-decoration: none;
   outline: none;
-  border: var(--border);
+  border: var(--border) !important;
   color: var(--color);
   background-color: var(--background);
   transition: background-color 0.2s ease, outline 0.2s ease;