From 36243d8b6251a35afe7ea56317355336980f7d65 Mon Sep 17 00:00:00 2001 From: amit Date: Sat, 9 Nov 2024 11:46:21 +0530 Subject: [PATCH] text color changed --- src/components/atoms/Loader.tsx | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/components/atoms/Loader.tsx b/src/components/atoms/Loader.tsx index 6bd4cfb8..35f9a506 100644 --- a/src/components/atoms/Loader.tsx +++ b/src/components/atoms/Loader.tsx @@ -1,11 +1,17 @@ import styled from "styled-components"; import { Stack } from "@mui/material"; +import { useThemeMode } from "../../context/theme-provider"; + interface LoaderProps { text: string; } export const Loader: React.FC = ({ text }) => { + + const { darkMode } = useThemeMode(); + + return ( @@ -14,18 +20,23 @@ export const Loader: React.FC = ({ text }) => { - {text} + {text} ); }; -const StyledParagraph = styled.p` +interface StyledParagraphProps { + darkMode: boolean; +} + + + +const StyledParagraph = styled.p` font-size: medium; font-weight: 700; font-family: inherit; - color: #333; + color: ${({ darkMode }) => (darkMode ? 'white' : 'black')}; margin-top: 20px; - flex:wrap; `; const DotsContainer = styled.div`