fix tyranic colors

This commit is contained in:
NilsUeter
2023-05-07 12:13:38 +02:00
parent 9e29014a6d
commit f7bb04d218
+4 -4
View File
@@ -9,17 +9,20 @@ export const Roster = ({ roster }) => {
return null; return null;
} }
const { name, cost, forces } = roster; const { name, cost, forces } = roster;
const primaryColor = getPrimaryColor(forces[0].catalog);
return ( return (
<div <div
style={{ style={{
display: "flex", display: "flex",
flexDirection: "column", flexDirection: "column",
gap: 32, gap: 32,
"--primary-color": primaryColor,
"--primary-color-transparent": primaryColor + "60",
}} }}
> >
<div <div
style={{ style={{
backgroundColor: "#536766", backgroundColor: "var(--primary-color)",
color: "#fff", color: "#fff",
padding: "4px 16px", padding: "4px 16px",
fontSize: " 1.7em", fontSize: " 1.7em",
@@ -87,13 +90,10 @@ const getPrimaryColor = (catalog) => {
const Force = ({ force }) => { const Force = ({ force }) => {
const { units, rules, catalog } = force; const { units, rules, catalog } = force;
const primaryColor = getPrimaryColor(catalog);
return ( return (
<div <div
style={{ style={{
display: "contents", display: "contents",
"--primary-color": primaryColor,
"--primary-color-transparent": "#53676660",
}} }}
> >
{units.map((unit, index) => ( {units.map((unit, index) => (