hide rules when desired
This commit is contained in:
+20
-1
@@ -808,9 +808,27 @@ const getSpellClassNames = (spells, index) => {
|
||||
};
|
||||
|
||||
const ForceRules = ({ rules, onePerPage }) => {
|
||||
const [hide, setHide] = useState(false);
|
||||
return (
|
||||
<div
|
||||
className={"avoid-page-break " + (onePerPage ? "page-break" : "")}
|
||||
className={
|
||||
"avoid-page-break " +
|
||||
(onePerPage ? "page-break" : "") +
|
||||
(hide ? " print-display-none" : "")
|
||||
}
|
||||
>
|
||||
<label
|
||||
className="print-display-none"
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
justifyContent: "flex-end",
|
||||
}}
|
||||
>
|
||||
<input type="checkbox" onChange={() => setHide(!hide)} />
|
||||
<span className="print-display-none">Don't print this card.</span>
|
||||
</label>
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
@@ -832,6 +850,7 @@ const ForceRules = ({ rules, onePerPage }) => {
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -108,7 +108,7 @@ const Weapon = ({ weapon, modelStats, isMelee, className, forceRules }) => {
|
||||
return abilities;
|
||||
};
|
||||
|
||||
replaceAbilityWithType(["Blast.", "Blast"], "Blast");
|
||||
replaceAbilityWithType(["Blast.", "Blast, ", "Blast"], "Blast");
|
||||
replaceAbilityWithType(
|
||||
[
|
||||
"Each time an attack is made with this weapon, that attack automatically hits the target.",
|
||||
|
||||
Reference in New Issue
Block a user