added button to reset custom color
This commit is contained in:
+14
-1
@@ -99,7 +99,7 @@ function App() {
|
||||
return (
|
||||
<div className="App">
|
||||
<div className="header print-display-none">
|
||||
<a href="/" style={{ color: "#fff", fontWeight: 800 }}>
|
||||
<a href="/fancyscribe" style={{ color: "#fff", fontWeight: 800 }}>
|
||||
FancyScribe
|
||||
</a>
|
||||
<div className="subheader">
|
||||
@@ -155,6 +155,7 @@ function App() {
|
||||
/>
|
||||
One Datacard per Page when Printing
|
||||
</label>
|
||||
<div style={{ display: "flex", alignItems: "center", gap: 4 }}>
|
||||
<label style={{ display: "flex", alignItems: "center", gap: 4 }}>
|
||||
<input
|
||||
type="color"
|
||||
@@ -166,6 +167,18 @@ function App() {
|
||||
></input>
|
||||
Custom Color
|
||||
</label>
|
||||
|
||||
{primaryColor !== getPrimaryColor(roster.forces[0].catalog) && (
|
||||
<button
|
||||
onClick={() =>
|
||||
setPrimaryColor(getPrimaryColor(roster.forces[0].catalog))
|
||||
}
|
||||
style={{ padding: "2px 4px", borderRadius: 4, borderWidth: 1 }}
|
||||
>
|
||||
Reset color
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="print-display-none" style={{ color: "red" }}>
|
||||
{error}
|
||||
|
||||
Reference in New Issue
Block a user