replace primary color with textColor

This commit is contained in:
Halit Aksoy 2022-07-13 15:21:30 +03:00
parent fb6045c229
commit 50c6dd92a6
5 changed files with 12 additions and 12 deletions

View File

@ -202,8 +202,8 @@ const Home: FunctionComponent<{ initial?: number }> = ({ initial = 0 }) => {
}; };
const menuTextColor = getColorByBrightness( const menuTextColor = getColorByBrightness(
context.themeManager.theme.appBarBgColor, context.themeManager.theme.appBarBgColor,
context.themeManager.theme.primary, context.themeManager.theme.textColor,
context.themeManager.theme.primaryLight context.themeManager.theme.textLightColor
); );
return ( return (
<div <div
@ -225,8 +225,8 @@ const Home: FunctionComponent<{ initial?: number }> = ({ initial = 0 }) => {
borderTopRightRadius: "1vw", borderTopRightRadius: "1vw",
minWidth: "10vw", minWidth: "10vw",
minHeight: "1vw", minHeight: "1vw",
background: context.themeManager.theme.primary, background: context.themeManager.theme.textColor,
color: context.themeManager.theme.primaryLight, color: context.themeManager.theme.textLightColor,
}} }}
> >
{connectionStateText()} {connectionStateText()}

View File

@ -70,8 +70,8 @@ const StoreView: FunctionComponent<{
)); ));
const textColor = getColorByBrightness( const textColor = getColorByBrightness(
pitViewModel.pitColor, pitViewModel.pitColor,
context.themeManager.theme.primary, context.themeManager.theme.textColor,
context.themeManager.theme.primaryLight context.themeManager.theme.textLightColor
); );
return ( return (
<div <div

View File

@ -11,8 +11,8 @@ const Button: FunctionComponent<{
}> = ({ context, text, color, onClick }) => { }> = ({ context, text, color, onClick }) => {
const textColor = getColorByBrightness( const textColor = getColorByBrightness(
color, color,
context.themeManager.theme.primary, context.themeManager.theme.textColor,
context.themeManager.theme.primaryLight context.themeManager.theme.textLightColor
); );
return ( return (
<button <button

View File

@ -89,8 +89,8 @@ const InfoPanel: FunctionComponent<{
: context.themeManager.theme.boardColor; : context.themeManager.theme.boardColor;
const textColor = getColorByBrightness( const textColor = getColorByBrightness(
containerColor, containerColor,
context.themeManager.theme.primary, context.themeManager.theme.textColor,
context.themeManager.theme.primaryLight context.themeManager.theme.textLightColor
); );
const text = getInfoPanelTextByGameState({ const text = getInfoPanelTextByGameState({
context, context,

View File

@ -1,8 +1,8 @@
export type Theme = { export type Theme = {
id: string; id: string;
name: string; name: string;
primary: string; textColor: string;
primaryLight: string; textLightColor: string;
background: string; background: string;
appBarBgColor: string; appBarBgColor: string;
playerTurnColor: string; playerTurnColor: string;