Add 's' method to access theme props (#5163)

This commit is contained in:
Tom Moor
2023-04-07 22:43:34 -04:00
committed by GitHub
parent c202198d61
commit 422bdc32d9
116 changed files with 482 additions and 388 deletions

View File

@@ -1,6 +1,7 @@
import { SearchIcon } from "outline-icons";
import * as React from "react";
import styled, { useTheme } from "styled-components";
import { s } from "@shared/styles";
import Flex from "~/components/Flex";
type Props = React.HTMLAttributes<HTMLInputElement> & {
@@ -57,26 +58,26 @@ const StyledInput = styled.input`
font-weight: 400;
outline: none;
border: 0;
background: ${(props) => props.theme.sidebarBackground};
transition: ${(props) => props.theme.backgroundTransition};
background: ${s("sidebarBackground")};
transition: ${s("backgroundTransition")};
border-radius: 4px;
color: ${(props) => props.theme.text};
color: ${s("text")};
::-webkit-search-cancel-button {
-webkit-appearance: none;
}
::-webkit-input-placeholder {
color: ${(props) => props.theme.placeholder};
color: ${s("placeholder")};
}
:-moz-placeholder {
color: ${(props) => props.theme.placeholder};
color: ${s("placeholder")};
}
::-moz-placeholder {
color: ${(props) => props.theme.placeholder};
color: ${s("placeholder")};
}
:-ms-input-placeholder {
color: ${(props) => props.theme.placeholder};
color: ${s("placeholder")};
}
`;