1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-21 05:21:17 -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

View File

@@ -2,17 +2,17 @@ import commaNumber from "comma-number";
import Link from "../Link";
import RelativeTime from "../RelativeTime";
import { StarOcticon, ForkOcticon } from "../Icons";
import { styled } from "../../lib/styles/stitches.config";
import { styled, theme } from "../../lib/styles/stitches.config";
import type { Project } from "../../types";
const Wrapper = styled("div", {
width: "100%",
padding: "1.2em 1.2em 0.8em 1.2em",
border: "1px solid $kindaLight",
borderRadius: "$rounded",
border: `1px solid ${theme.colors.kindaLight}`,
borderRadius: theme.radii.rounded,
fontSize: "0.85em",
color: "$mediumDark",
transition: "border $fade",
color: theme.colors.mediumDark,
transition: `border ${theme.transitions.fade}`,
});
const Name = styled(Link, {
@@ -36,14 +36,14 @@ const MetaItem = styled("div", {
marginRight: "1.5em",
fontSize: "0.875em",
lineHeight: 2,
color: "$medium",
color: theme.colors.medium,
});
const MetaLink = styled(Link, {
color: "inherit",
"&:hover": {
color: "$link",
color: theme.colors.link,
},
});