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,12 +1,13 @@
import * as React from "react";
import styled from "styled-components";
import { s } from "@shared/styles";
type Props = {
sticky?: boolean;
};
const H3 = styled.h3`
border-bottom: 1px solid ${(props) => props.theme.divider};
border-bottom: 1px solid ${s("divider")};
margin: 12px 0;
line-height: 1;
`;
@@ -16,7 +17,7 @@ const Underline = styled.div`
font-weight: 500;
font-size: 14px;
line-height: 1.5;
color: ${(props) => props.theme.textSecondary};
color: ${s("textSecondary")};
padding-top: 6px;
padding-bottom: 6px;
`;
@@ -28,8 +29,8 @@ const Background = styled.div<{ sticky?: boolean }>`
${(props) => (props.sticky ? "top: 54px;" : "")}
margin: 0 -8px;
padding: 0 8px;
background: ${(props) => props.theme.background};
transition: ${(props) => props.theme.backgroundTransition};
background: ${s("background")};
transition: ${s("backgroundTransition")};
z-index: 1;
`;