We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e45a78 commit 14d62c0Copy full SHA for 14d62c0
src/components/Text.tsx
@@ -1,6 +1,7 @@
1
import React from "react";
2
import "./css/main.css";
3
import styled from "styled-components";
4
+import { getThemeValue } from "./ThemeProvider";
5
6
export type TextProps = React.HTMLAttributes<
7
HTMLHeadingElement | HTMLParagraphElement
@@ -50,5 +51,5 @@ const TextElement = styled.p<TextProps>`
50
51
font-family: "Poppins", sans-serif;
52
font-weight: ${(props) => variantMapping[props.variant ?? "p"].fontWeight};
53
font-size: ${(props) => variantMapping[props.variant ?? "p"].fontSize};
- color: ${(props) => props.theme.text};
54
+ color: ${(props) => props.theme.text ?? getThemeValue("text")};
55
`;
0 commit comments