generated from Fascinated/nextjs-13-template-with-tailwindcss
add button text color to theme
All checks were successful
Publish Docker Image / docker (push) Successful in 1m49s
All checks were successful
Publish Docker Image / docker (push) Successful in 1m49s
This commit is contained in:
parent
926909b9bb
commit
5e5d33c610
@ -21,19 +21,23 @@ export default function Home() {
|
|||||||
} = Config; // All of the settings pulled from the config file
|
} = Config; // All of the settings pulled from the config file
|
||||||
|
|
||||||
// Theme colors to use when using the selected theme
|
// Theme colors to use when using the selected theme
|
||||||
|
// all used colors are from TailwindCSS
|
||||||
const themeColors: {
|
const themeColors: {
|
||||||
[key: string]: {
|
[key: string]: {
|
||||||
background: string;
|
background: string;
|
||||||
textColor: string;
|
textColor: string;
|
||||||
|
buttonTextColor: string;
|
||||||
};
|
};
|
||||||
} = {
|
} = {
|
||||||
dark: {
|
dark: {
|
||||||
background: "bg-neutral-900",
|
background: "bg-neutral-900",
|
||||||
textColor: "text-white",
|
textColor: "text-white",
|
||||||
|
buttonTextColor: "text-white",
|
||||||
},
|
},
|
||||||
light: {
|
light: {
|
||||||
background: "bg-white",
|
background: "bg-white",
|
||||||
textColor: "text-black",
|
textColor: "text-black",
|
||||||
|
buttonTextColor: "text-white",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
const selectedTheme = themeColors[theme]; // The theme to use
|
const selectedTheme = themeColors[theme]; // The theme to use
|
||||||
@ -94,7 +98,7 @@ export default function Home() {
|
|||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
className={`flex flex-row items-center justify-center mt-4 px-4 w-60 py-2 rounded
|
className={`flex flex-row items-center justify-center mt-4 px-4 w-60 py-2 rounded
|
||||||
text-white ${link.color.normal} hover:brightness-75 transition`}
|
${selectedTheme.buttonTextColor} ${link.color.normal} hover:brightness-75 transition`}
|
||||||
>
|
>
|
||||||
{link.icon && (
|
{link.icon && (
|
||||||
<>
|
<>
|
||||||
|
Loading…
Reference in New Issue
Block a user