1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2026-05-15 21:34:26 -04:00

refactor component styles to use type-safe stitches tokens

https://stitches.dev/docs/typescript#stricter-experience
This commit is contained in:
2022-07-07 13:33:20 -04:00
parent 2c7e266fc3
commit b1a92a2eab
40 changed files with 170 additions and 223 deletions
+4 -4
View File
@@ -1,16 +1,16 @@
import innerText from "react-innertext";
import HeadingAnchor from "../HeadingAnchor";
import { styled } from "../../lib/styles/stitches.config";
import { styled, theme } from "../../lib/styles/stitches.config";
import type { ComponentProps } from "react";
const Anchor = styled(HeadingAnchor, {
margin: "0 0.4em",
padding: "0 0.2em",
color: "$medium",
color: theme.colors.medium,
opacity: 0, // overridden on hover below (except on small screens)
"&:hover": {
color: "$link",
color: theme.colors.link,
},
"@medium": {
@@ -45,7 +45,7 @@ const H = styled("h1", {
divider: {
true: {
paddingBottom: "0.25em",
borderBottom: "1px solid $kindaLight",
borderBottom: `1px solid ${theme.colors.kindaLight}`,
},
false: {},
},