Add 's' method to access theme props (#5163)
This commit is contained in:
@@ -2,6 +2,7 @@ import { escapeRegExp } from "lodash";
|
||||
import * as React from "react";
|
||||
import replace from "string-replace-to-array";
|
||||
import styled from "styled-components";
|
||||
import { s } from "@shared/styles";
|
||||
|
||||
type Props = React.HTMLAttributes<HTMLSpanElement> & {
|
||||
highlight: (string | null | undefined) | RegExp;
|
||||
@@ -43,7 +44,7 @@ function Highlight({
|
||||
}
|
||||
|
||||
export const Mark = styled.mark`
|
||||
background: ${(props) => props.theme.searchHighlight};
|
||||
background: ${s("searchHighlight")};
|
||||
border-radius: 2px;
|
||||
padding: 0 2px;
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user