From 824af2b7b57ecc3854b5e19dc23a0cf0478101e6 Mon Sep 17 00:00:00 2001 From: stanislavh Date: Fri, 30 Jun 2023 09:57:23 +0200 Subject: [PATCH] SONAR-19711 Move table header form to the new UI --- .../design-system/src/components/SearchHighlighter.tsx | 6 +++--- .../__tests__/__snapshots__/CodeSnippet-test.tsx.snap | 4 ++-- server/sonar-web/design-system/src/components/buttons.tsx | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/server/sonar-web/design-system/src/components/SearchHighlighter.tsx b/server/sonar-web/design-system/src/components/SearchHighlighter.tsx index 54ff9938766..95f160deab3 100644 --- a/server/sonar-web/design-system/src/components/SearchHighlighter.tsx +++ b/server/sonar-web/design-system/src/components/SearchHighlighter.tsx @@ -20,11 +20,11 @@ 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(undefined); +export const SearchHighlighterContext = React.createContext(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) { diff --git a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/CodeSnippet-test.tsx.snap b/server/sonar-web/design-system/src/components/__tests__/__snapshots__/CodeSnippet-test.tsx.snap index 589692fbb31..84ed10557aa 100644 --- a/server/sonar-web/design-system/src/components/__tests__/__snapshots__/CodeSnippet-test.tsx.snap +++ b/server/sonar-web/design-system/src/components/__tests__/__snapshots__/CodeSnippet-test.tsx.snap @@ -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; diff --git a/server/sonar-web/design-system/src/components/buttons.tsx b/server/sonar-web/design-system/src/components/buttons.tsx index c037c533d27..d5dc804a097 100644 --- a/server/sonar-web/design-system/src/components/buttons.tsx +++ b/server/sonar-web/design-system/src/components/buttons.tsx @@ -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; -- 2.39.5